File tree Expand file tree Collapse file tree 4 files changed +528
-205
lines changed Expand file tree Collapse file tree 4 files changed +528
-205
lines changed Original file line number Diff line number Diff line change 46
46
"@walletconnect/web3-provider" : " ^1.0.0-beta.45" ,
47
47
"authereum" : " ^0.0.4-beta.88" ,
48
48
"bignumber.js" : " ^9.0.0" ,
49
- "bnc-sdk" : " 1.1 .0" ,
49
+ "bnc-sdk" : " 2.0 .0" ,
50
50
"bowser" : " ^2.5.2" ,
51
51
"ethereumjs-tx" : " ^2.1.2" ,
52
52
"ethereumjs-util" : " ^6.2.0" ,
Original file line number Diff line number Diff line change 1
- import blocknativeApi from 'bnc-sdk'
1
+ import BlocknativeApi from 'bnc-sdk'
2
2
3
3
let blocknative : any
4
4
5
5
export function initializeBlocknative ( dappId : string , networkId : number ) : any {
6
- blocknative = blocknativeApi ( {
6
+ blocknative = new BlocknativeApi ( {
7
7
dappId,
8
- networkId
8
+ networkId,
9
+ name : 'Onboard'
9
10
} )
10
11
11
12
return blocknative
Original file line number Diff line number Diff line change @@ -271,11 +271,10 @@ function createBalanceStore(initialState: string | null): BalanceStore {
271
271
272
272
// unsubscribe from previous address
273
273
if ( emitterAddress ) {
274
- blocknative . unsubscribe ( blocknative . clientIndex , emitterAddress )
274
+ blocknative . unsubscribe ( emitterAddress )
275
275
}
276
276
277
- emitter = blocknative . account ( blocknative . clientIndex , $address )
278
- . emitter
277
+ emitter = blocknative . account ( $address ) . emitter
279
278
280
279
emitter . on ( 'txConfirmed' , ( ) => {
281
280
if ( stateSyncer . get ) {
@@ -297,7 +296,7 @@ function createBalanceStore(initialState: string | null): BalanceStore {
297
296
const blocknative = getBlocknative ( )
298
297
299
298
// unsubscribe from previous address
300
- blocknative . unsubscribe ( blocknative . clientIndex , emitterAddress )
299
+ blocknative . unsubscribe ( emitterAddress )
301
300
302
301
// no address, so set balance to undefined
303
302
set && set ( undefined )
You can’t perform that action at this time.
0 commit comments