Skip to content

Commit

Permalink
Merge pull request #267 from blocknative/develop
Browse files Browse the repository at this point in the history
Release 1.4.1
  • Loading branch information
lnbc1QWFyb24 authored Mar 25, 2020
2 parents bb7af45 + 388c131 commit 15a7a15
Show file tree
Hide file tree
Showing 6 changed files with 533 additions and 206 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bnc-onboard",
"version": "1.4.0",
"version": "1.4.1",
"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.",
"keywords": [
"ethereum",
Expand Down Expand Up @@ -46,7 +46,7 @@
"@walletconnect/web3-provider": "^1.0.0-beta.45",
"authereum": "^0.0.4-beta.88",
"bignumber.js": "^9.0.0",
"bnc-sdk": "1.1.0",
"bnc-sdk": "2.0.0",
"bowser": "^2.5.2",
"ethereumjs-tx": "^2.1.2",
"ethereumjs-util": "^6.2.0",
Expand Down
2 changes: 2 additions & 0 deletions src/modules/select/wallets/ledger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ function ledger(options: LedgerOptions & CommonWalletOptions): WalletModule {
},
type: 'hardware',
desktop: true,
mobile: true,
osExclusions: ['iOS'],
preferred
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/modules/select/wallets/trezor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ function trezor(options: TrezorOptions & CommonWalletOptions): WalletModule {
},
type: 'hardware',
desktop: true,
mobile: true,
osExclusions: ['iOS'],
preferred
}
}
Expand Down
7 changes: 4 additions & 3 deletions src/services.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import blocknativeApi from 'bnc-sdk'
import BlocknativeApi from 'bnc-sdk'

let blocknative: any

export function initializeBlocknative(dappId: string, networkId: number): any {
blocknative = blocknativeApi({
blocknative = new BlocknativeApi({
dappId,
networkId
networkId,
name: 'Onboard'
})

return blocknative
Expand Down
7 changes: 3 additions & 4 deletions src/stores.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,10 @@ function createBalanceStore(initialState: string | null): BalanceStore {

// unsubscribe from previous address
if (emitterAddress) {
blocknative.unsubscribe(blocknative.clientIndex, emitterAddress)
blocknative.unsubscribe(emitterAddress)
}

emitter = blocknative.account(blocknative.clientIndex, $address)
.emitter
emitter = blocknative.account($address).emitter

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

// unsubscribe from previous address
blocknative.unsubscribe(blocknative.clientIndex, emitterAddress)
blocknative.unsubscribe(emitterAddress)

// no address, so set balance to undefined
set && set(undefined)
Expand Down
Loading

0 comments on commit 15a7a15

Please sign in to comment.