Skip to content

Commit 4fbdd80

Browse files
1.34.1-0.1.3: [update] Bump WalletLink to 2.1.9 (#671)
* Update walletlink to 2.1.9 * version bump * Update formating Co-authored-by: arjun-dureja <arjun.dureja@coinbase.com> Co-authored-by: Taylor Dawson <taylorjdawson@gmail.com>
1 parent 55dcc8f commit 4fbdd80

File tree

6 files changed

+67
-57
lines changed

6 files changed

+67
-57
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bnc-onboard",
3-
"version": "1.34.1-0.1.2",
3+
"version": "1.34.1-0.1.3",
44
"description": "Onboard users to web3 by allowing them to select a wallet, get that wallet ready to transact and have access to synced wallet state.",
55
"keywords": [
66
"ethereum",
@@ -83,7 +83,7 @@
8383
"hdkey": "^2.0.1",
8484
"regenerator-runtime": "^0.13.7",
8585
"trezor-connect": "^8.1.9",
86-
"walletlink": "^2.1.6",
86+
"walletlink": "^2.1.9",
8787
"web3-provider-engine": "^15.0.4"
8888
},
8989
"resolutions": {

src/interfaces.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ export interface StateAndHelpers extends UserState {
9494
exit: (completed?: boolean, state?: Partial<AppState>) => void
9595
stateSyncStatus: {
9696
[key: string]:
97-
| null
98-
| CancelablePromise
99-
| Promise<Array<string>>
100-
| Promise<string>
101-
| Promise<void>
97+
| null
98+
| CancelablePromise
99+
| Promise<Array<string>>
100+
| Promise<string>
101+
| Promise<void>
102102
balance: null | CancelablePromise
103103
address: null | Promise<Array<string>>
104104
network: null | Promise<string>
@@ -378,12 +378,12 @@ export interface TorusOptions extends CommonWalletOptions {
378378
modalZIndex?: number
379379
apiKey?: string
380380
buildEnv?:
381-
| 'production'
382-
| 'development'
383-
| 'binance'
384-
| 'testing'
385-
| 'lrc'
386-
| 'beta'
381+
| 'production'
382+
| 'development'
383+
| 'binance'
384+
| 'testing'
385+
| 'lrc'
386+
| 'beta'
387387
enableLogging?: boolean
388388
enabledVerifiers?: VerifierStatus
389389
loginConfig?: LoginConfig

src/modules/select/wallets/coinbase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function coinbase(options: CommonWalletOptions): WalletModule {
2424
}
2525
},
2626
type: 'injected',
27-
link: 'https://go.cb-w.com/',
27+
link: `https://go.cb-w.com/xoXnYwQimhb?cb_url=${window.location.href}`,
2828
installMessage: mobileWalletInstallMessage,
2929
mobile: true,
3030
preferred

src/modules/select/wallets/mewwallet.ts

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
1-
import {
2-
MewConnectOptions,
3-
WalletModule,
4-
Helpers
5-
} from '../../../interfaces'
1+
import { MewConnectOptions, WalletModule, Helpers } from '../../../interfaces'
62
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
73
// @ts-ignore
8-
import MEWWallet from '@myetherwallet/mewconnect-web-client';
4+
import MEWWallet from '@myetherwallet/mewconnect-web-client'
95
import mewWalletIcon from '../wallet-icons/icon-mew-wallet'
106

11-
function mewConnect(
12-
options: MewConnectOptions
13-
): WalletModule {
14-
const { rpcUrl, iconSrc, networkId, preferred } =
15-
options
7+
function mewConnect(options: MewConnectOptions): WalletModule {
8+
const { rpcUrl, iconSrc, networkId, preferred } = options
169

1710
return {
1811
name: 'MEW Wallet',
@@ -27,7 +20,7 @@ function mewConnect(
2720
})
2821
const provider = mewConnect.makeWeb3Provider()
2922
if (mewConnect.isConnected) {
30-
mewConnect.disconnect();
23+
mewConnect.disconnect()
3124
resetWalletState({ disconnected: true, walletName: 'MEW Wallet' })
3225
}
3326
mewConnect.on('popupWindowClosed', () => {
@@ -37,17 +30,18 @@ function mewConnect(
3730
provider,
3831
interface: {
3932
name: 'MEW Wallet',
40-
connect: () => new Promise((resolve, reject) => {
41-
provider
42-
.enable()
43-
.then(resolve)
44-
.catch(() => {
45-
reject({
46-
message:
47-
'This dapp needs access to your account information.'
33+
connect: () =>
34+
new Promise((resolve, reject) => {
35+
provider
36+
.enable()
37+
.then(resolve)
38+
.catch(() => {
39+
reject({
40+
message:
41+
'This dapp needs access to your account information.'
42+
})
4843
})
49-
})
50-
}),
44+
}),
5145
address: {
5246
get: () => getAddress(provider)
5347
},
@@ -67,7 +61,6 @@ function mewConnect(
6761
type: 'injected',
6862
desktop: true,
6963
preferred
70-
7164
}
7265
}
7366

src/stores.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ export const app: WritableStore = writable({
4141

4242
export const stateSyncStatus: {
4343
[key: string]:
44-
| null
45-
| CancelablePromise
46-
| Promise<Array<string>>
47-
| Promise<string>
48-
| Promise<void>
44+
| null
45+
| CancelablePromise
46+
| Promise<Array<string>>
47+
| Promise<string>
48+
| Promise<void>
4949
balance: null | CancelablePromise
5050
address: null | Promise<Array<string>>
5151
network: null | Promise<string>
@@ -78,10 +78,10 @@ export function initializeStores() {
7878
balance = get(app).dappId
7979
? createBalanceStore(null)
8080
: createWalletStateSliceStore({
81-
parameter: 'balance',
82-
initialState: null,
83-
intervalSetting: 1000
84-
})
81+
parameter: 'balance',
82+
initialState: null,
83+
intervalSetting: 1000
84+
})
8585

8686
wallet = writable({
8787
name: null,
@@ -300,7 +300,7 @@ function createBalanceStore(initialState: string | null): BalanceStore {
300300
let stateSyncer: StateSyncer
301301
let emitter: any
302302
let emitterAddress: string | undefined
303-
let cancel: () => void = () => { }
303+
let cancel: () => void = () => {}
304304

305305
const { subscribe } = derived(
306306
[address, network],
@@ -349,7 +349,7 @@ function createBalanceStore(initialState: string | null): BalanceStore {
349349
emitterAddress = $address
350350
})
351351
// swallow possible timeout error for sending configuration
352-
.catch(() => { })
352+
.catch(() => {})
353353
}
354354
} else if (emitterAddress && !$address) {
355355
const blocknative = getBlocknative()
@@ -412,7 +412,7 @@ function syncStateWithTimeout(options: {
412412
const { getState, setState, timeout, currentBalance, pollStart } = options
413413

414414
if (pollStart && Date.now() - pollStart > 25000) {
415-
return () => { }
415+
return () => {}
416416
}
417417

418418
const prom = makeCancelable(getState())

yarn.lock

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6184,7 +6184,7 @@ inflight@^1.0.4:
61846184
once "^1.3.0"
61856185
wrappy "1"
61866186

6187-
inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3:
6187+
inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4:
61886188
version "2.0.4"
61896189
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
61906190
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
@@ -6626,6 +6626,10 @@ isstream@~0.1.2:
66266626
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
66276627
integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=
66286628

6629+
js-sha256@0.9.0:
6630+
version "0.9.0"
6631+
resolved "https://registry.yarnpkg.com/js-sha256/-/js-sha256-0.9.0.tgz#0b89ac166583e91ef9123644bd3c5334ce9d0966"
6632+
integrity sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==
66296633
isurl@^1.0.0-alpha5:
66306634
version "1.0.0"
66316635
resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67"
@@ -8689,7 +8693,7 @@ readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable
86898693
string_decoder "~1.1.1"
86908694
util-deprecate "~1.0.1"
86918695

8692-
readable-stream@^3.1.1, readable-stream@^3.6.0:
8696+
readable-stream@^3.1.1, readable-stream@^3.5.0, readable-stream@^3.6.0:
86938697
version "3.6.0"
86948698
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198"
86958699
integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==
@@ -9548,6 +9552,14 @@ stream-browserify@^2.0.1:
95489552
inherits "~2.0.1"
95499553
readable-stream "^2.0.2"
95509554

9555+
stream-browserify@^3.0.0:
9556+
version "3.0.0"
9557+
resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f"
9558+
integrity sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==
9559+
dependencies:
9560+
inherits "~2.0.4"
9561+
readable-stream "^3.5.0"
9562+
95519563
stream-http@^2.7.2:
95529564
version "2.8.3"
95539565
resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc"
@@ -10261,7 +10273,7 @@ util@^0.11.0:
1026110273
dependencies:
1026210274
inherits "2.0.3"
1026310275

10264-
util@^0.12.0:
10276+
util@^0.12.0, util@^0.12.4:
1026510277
version "0.12.4"
1026610278
resolved "https://registry.yarnpkg.com/util/-/util-0.12.4.tgz#66121a31420df8f01ca0c464be15dfa1d1850253"
1026710279
integrity sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==
@@ -10351,27 +10363,32 @@ vm-browserify@^1.0.1:
1035110363
version "1.1.2"
1035210364
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0"
1035310365
integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==
10354-
10366+
1035510367
vue@^2.6.10:
1035610368
version "2.6.14"
1035710369
resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.14.tgz#e51aa5250250d569a3fbad3a8a5a687d6036e235"
1035810370
integrity sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==
1035910371

10360-
walletlink@^2.1.6:
10361-
version "2.1.6"
10362-
resolved "https://registry.yarnpkg.com/walletlink/-/walletlink-2.1.6.tgz#4e48310af09bb0c940a156c26c1d0b1b9506ddb9"
10363-
integrity sha512-4M+8GrDq4zUCcRsbpBVIwMLVxJ8Fg8ybWi1E6K9d2cYHO1S9WnzsV5MN6HDyThBci00a+O3tKeUD++nVaUyA5g==
10372+
walletlink@^2.1.9:
10373+
version "2.1.9"
10374+
resolved "https://registry.yarnpkg.com/walletlink/-/walletlink-2.1.9.tgz#c11c834bf0ff802312505704ff1845de89fbae0c"
10375+
integrity sha512-uwGja18XEm7gUDcMq5RzMhXpmX7nMg1cGm+/0g6+KgfhMoyTd7ogUmSDQRoVboL/wHItyYK8UT5dCdV+b62LAQ==
1036410376
dependencies:
1036510377
"@metamask/safe-event-emitter" "2.0.0"
1036610378
bind-decorator "^1.0.11"
1036710379
bn.js "^5.1.1"
10380+
buffer "^6.0.3"
1036810381
clsx "^1.1.0"
1036910382
eth-block-tracker "4.4.3"
1037010383
eth-json-rpc-filters "4.2.2"
1037110384
eth-rpc-errors "4.0.2"
10385+
js-sha256 "0.9.0"
1037210386
json-rpc-engine "6.1.0"
10387+
keccak "^3.0.1"
1037310388
preact "^10.5.9"
1037410389
rxjs "^6.6.3"
10390+
stream-browserify "^3.0.0"
10391+
util "^0.12.4"
1037510392

1037610393
warning@^4.0.3:
1037710394
version "4.0.3"

0 commit comments

Comments
 (0)