File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/modules/select/wallets Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
import Portis from "@portis/web3"
2
2
3
+ import { networkName } from "../../../utilities"
3
4
import portisIcon from "../wallet-icons/icon-portis.svg"
4
5
5
6
function portis ( options ) {
6
7
if ( ! options || typeof options !== "object" ) {
7
8
throw new Error ( "An options object is required to initialize portis module" )
8
9
}
9
10
10
- const { apiKey, network } = options
11
+ const { apiKey, networkId } = options
11
12
12
13
if ( ! apiKey || typeof apiKey !== "string" ) {
13
14
throw new Error (
14
15
"A apiKey of type string is required to initialize portis module"
15
16
)
16
17
}
17
18
18
- if ( ! network || typeof network !== "string " ) {
19
+ if ( ! networkId || typeof networkId !== "number " ) {
19
20
throw new Error (
20
- "A network of type string is required to initialize portis module"
21
+ "A network of type number is required to initialize portis module"
21
22
)
22
23
}
23
24
24
25
return {
25
26
name : "Portis" ,
26
27
iconSrc : portisIcon ,
27
28
wallet : ( { BigNumber } ) => {
28
- const portis = new Portis ( apiKey , network )
29
+ const portis = new Portis ( apiKey , networkName ( networkId ) )
29
30
const { provider } = portis
30
31
31
32
return {
You can’t perform that action at this time.
0 commit comments