Skip to content

Commit f521451

Browse files
authored
Merge pull request #197 from blocknative/develop
Release 1.2.3
2 parents 5194d9e + 452b332 commit f521451

File tree

4 files changed

+22
-10
lines changed

4 files changed

+22
-10
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.2.2",
3+
"version": "1.2.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",
@@ -43,7 +43,7 @@
4343
"@portis/web3": "^2.0.0-beta.42",
4444
"@toruslabs/torus-embed": "^0.2.11",
4545
"@walletconnect/web3-provider": "^1.0.0-beta.45",
46-
"authereum": "^0.0.4-beta.26",
46+
"authereum": "^0.0.4-beta.88",
4747
"bignumber.js": "^9.0.0",
4848
"bnc-sdk": "1.0.3",
4949
"bowser": "^2.5.2",

src/interfaces.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,16 @@ export interface TorusOptions {
147147
enableLogging?: boolean
148148
}
149149

150+
export interface AuthereumOptions {
151+
disableNotifications?: boolean
152+
}
153+
150154
export interface WalletInitOptions
151155
extends CommonWalletOptions,
152-
SdkWalletOptions,
153-
WalletConnectOptions,
154-
TorusOptions {
156+
SdkWalletOptions,
157+
WalletConnectOptions,
158+
TorusOptions,
159+
AuthereumOptions {
155160
walletName: string
156161
}
157162

src/modules/select/wallets/authereum.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import authereumIcon from '../wallet-icons/icon-authereum.png'
22
import { networkName } from '../../../utilities'
3-
import { WalletModule, CommonWalletOptions } from '../../../interfaces'
3+
import { WalletModule, AuthereumOptions, CommonWalletOptions } from '../../../interfaces'
44

5-
function authereum(options: CommonWalletOptions): WalletModule {
6-
const { networkId, preferred, label, iconSrc, svg } = options
5+
function authereum(options: AuthereumOptions & CommonWalletOptions): WalletModule {
6+
const { networkId, preferred, label, iconSrc, svg, disableNotifications } = options
77

88
return {
99
name: label || 'Authereum',
@@ -13,7 +13,7 @@ function authereum(options: CommonWalletOptions): WalletModule {
1313
const { default: Authereum } = await import('authereum')
1414
const instance = new Authereum({
1515
networkName: networkName(networkId),
16-
disableNotifications: true
16+
disableNotifications: disableNotifications // default: false
1717
})
1818

1919
const provider = instance.getProvider()
@@ -45,7 +45,7 @@ function authereum(options: CommonWalletOptions): WalletModule {
4545
},
4646
desktop: true,
4747
mobile: true,
48-
url: 'https://accounts.authereum.org/',
48+
url: `https://${networkId !== 1 ? `${networkName(networkId)}.` : ''}authereum.com/`,
4949
preferred
5050
}
5151
}

src/validation.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@ export function validateWalletInit(
529529
enableLogging,
530530
loginMethod,
531531
showTorusButton,
532+
disableNotifications,
532533
...otherParams
533534
} = walletInit
534535

@@ -634,4 +635,10 @@ export function validateWalletInit(
634635
type: 'boolean',
635636
optional: true
636637
})
638+
validateType({
639+
name: 'walletInit.disableNotifications',
640+
value: disableNotifications,
641+
type: 'boolean',
642+
optional: true
643+
})
637644
}

0 commit comments

Comments
 (0)