Skip to content

Commit 15a7a15

Browse files
authored
Merge pull request #267 from blocknative/develop
Release 1.4.1
2 parents bb7af45 + 388c131 commit 15a7a15

File tree

6 files changed

+533
-206
lines changed

6 files changed

+533
-206
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.4.0",
3+
"version": "1.4.1",
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",
@@ -46,7 +46,7 @@
4646
"@walletconnect/web3-provider": "^1.0.0-beta.45",
4747
"authereum": "^0.0.4-beta.88",
4848
"bignumber.js": "^9.0.0",
49-
"bnc-sdk": "1.1.0",
49+
"bnc-sdk": "2.0.0",
5050
"bowser": "^2.5.2",
5151
"ethereumjs-tx": "^2.1.2",
5252
"ethereumjs-util": "^6.2.0",

src/modules/select/wallets/ledger.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ function ledger(options: LedgerOptions & CommonWalletOptions): WalletModule {
6767
},
6868
type: 'hardware',
6969
desktop: true,
70+
mobile: true,
71+
osExclusions: ['iOS'],
7072
preferred
7173
}
7274
}

src/modules/select/wallets/trezor.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ function trezor(options: TrezorOptions & CommonWalletOptions): WalletModule {
6767
},
6868
type: 'hardware',
6969
desktop: true,
70+
mobile: true,
71+
osExclusions: ['iOS'],
7072
preferred
7173
}
7274
}

src/services.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
import blocknativeApi from 'bnc-sdk'
1+
import BlocknativeApi from 'bnc-sdk'
22

33
let blocknative: any
44

55
export function initializeBlocknative(dappId: string, networkId: number): any {
6-
blocknative = blocknativeApi({
6+
blocknative = new BlocknativeApi({
77
dappId,
8-
networkId
8+
networkId,
9+
name: 'Onboard'
910
})
1011

1112
return blocknative

src/stores.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,10 @@ function createBalanceStore(initialState: string | null): BalanceStore {
271271

272272
// unsubscribe from previous address
273273
if (emitterAddress) {
274-
blocknative.unsubscribe(blocknative.clientIndex, emitterAddress)
274+
blocknative.unsubscribe(emitterAddress)
275275
}
276276

277-
emitter = blocknative.account(blocknative.clientIndex, $address)
278-
.emitter
277+
emitter = blocknative.account($address).emitter
279278

280279
emitter.on('txConfirmed', () => {
281280
if (stateSyncer.get) {
@@ -297,7 +296,7 @@ function createBalanceStore(initialState: string | null): BalanceStore {
297296
const blocknative = getBlocknative()
298297

299298
// unsubscribe from previous address
300-
blocknative.unsubscribe(blocknative.clientIndex, emitterAddress)
299+
blocknative.unsubscribe(emitterAddress)
301300

302301
// no address, so set balance to undefined
303302
set && set(undefined)

0 commit comments

Comments
 (0)