Skip to content

Commit ba92a2b

Browse files
1.33.0-0.2.1: [feature] Adds optional custom rpc url for formatic (#655)
* 1.33.0-0.2.1: [feature] Adds optional custom rpc url for formatic
1 parent 7c1d1cd commit ba92a2b

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bnc-onboard",
3-
"version": "1.33.0-0.1.1",
3+
"version": "1.33.0-0.2.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",

src/modules/select/wallets/fortmatic.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { SdkWalletOptions, WalletModule, Helpers } from '../../../interfaces'
44
import fortmaticIcon from '../wallet-icons/icon-fortmatic'
55

66
function fortmatic(
7-
options: SdkWalletOptions & { networkId: number }
7+
options: SdkWalletOptions & { networkId: number; rpcUrl: string }
88
): WalletModule {
9-
const { apiKey, networkId, preferred, label, iconSrc, svg } = options
9+
const { apiKey, rpcUrl, networkId, preferred, label, iconSrc, svg } = options
1010

1111
return {
1212
name: label || 'Fortmatic',
@@ -17,7 +17,11 @@ function fortmatic(
1717

1818
const instance = new Fortmatic(
1919
apiKey,
20-
networkId === 1 ? undefined : networkName(networkId)
20+
rpcUrl
21+
? { chainId: networkId, rpcUrl }
22+
: networkId === 1
23+
? undefined
24+
: networkName(networkId)
2125
)
2226

2327
const provider = instance.getProvider()

0 commit comments

Comments
 (0)