Skip to content

Commit e2ffa0a

Browse files
Fixes formatting (#528)
Co-authored-by: Aaron <abarnard@protonmail.com>
1 parent 8ea22ae commit e2ffa0a

File tree

10 files changed

+95
-99
lines changed

10 files changed

+95
-99
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.22.0-0.2.0",
3+
"version": "1.22.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/wallet-icons/icon-lattice.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ const latticeIcon = `
88
</svg>
99
`
1010

11-
export default latticeIcon
11+
export default latticeIcon

src/modules/select/wallets/atoken.ts

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,34 @@ import atokenIcon from '../wallet-icons/icon-atoken.png'
55
import atokenIcon2x from '../wallet-icons/icon-atoken@2x.png'
66

77
function atoken(options: CommonWalletOptions): WalletModule {
8-
const { preferred, label, iconSrc, svg } = options
8+
const { preferred, label, iconSrc, svg } = options
99

10-
return {
11-
name: label || 'AToken',
12-
iconSrc: iconSrc || atokenIcon,
13-
iconSrcSet: iconSrc || atokenIcon2x,
14-
svg,
15-
wallet: async (helpers: Helpers) => {
16-
const { getProviderName, createModernProviderInterface } = helpers
10+
return {
11+
name: label || 'AToken',
12+
iconSrc: iconSrc || atokenIcon,
13+
iconSrcSet: iconSrc || atokenIcon2x,
14+
svg,
15+
wallet: async (helpers: Helpers) => {
16+
const { getProviderName, createModernProviderInterface } = helpers
1717

18-
const provider =
19-
(window as any).ethereum ||
20-
((window as any).web3 && (window as any).web3.currentProvider)
18+
const provider =
19+
(window as any).ethereum ||
20+
((window as any).web3 && (window as any).web3.currentProvider)
2121

22-
return {
23-
provider,
24-
interface:
25-
(getProviderName(provider) === 'AToken' &&
26-
createModernProviderInterface(provider)) ||
27-
null
28-
}
29-
},
30-
type: 'injected',
31-
link: 'https://www.atoken.com',
32-
installMessage: mobileWalletInstallMessage,
33-
mobile: true,
34-
preferred
35-
}
22+
return {
23+
provider,
24+
interface:
25+
(getProviderName(provider) === 'AToken' &&
26+
createModernProviderInterface(provider)) ||
27+
null
28+
}
29+
},
30+
type: 'injected',
31+
link: 'https://www.atoken.com',
32+
installMessage: mobileWalletInstallMessage,
33+
mobile: true,
34+
preferred
35+
}
3636
}
3737

3838
export default atoken

src/modules/select/wallets/dcent.ts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,32 @@ function dcent(options: CommonWalletOptions): WalletModule {
88
const url = (window as any).location.origin || (window as any).location.host
99
const encodedUrl = encodeURIComponent(url)
1010
return {
11-
name: label || 'D\'CENT',
11+
name: label || "D'CENT",
1212
svg: svg || dcentIcon,
1313
iconSrc,
1414
wallet: async (helpers: Helpers) => {
15-
const {
16-
getProviderName,
17-
createModernProviderInterface,
18-
createLegacyProviderInterface
15+
const {
16+
getProviderName,
17+
createModernProviderInterface,
18+
createLegacyProviderInterface
1919
} = helpers
20-
21-
const provider = (window as any).ethereum ||
22-
(window as any).web3 && (window as any).web3.currentProvider
20+
21+
const provider =
22+
(window as any).ethereum ||
23+
((window as any).web3 && (window as any).web3.currentProvider)
2324

2425
return {
2526
provider,
2627
interface:
27-
provider && getProviderName(provider) === 'D\'CENT'
28+
provider && getProviderName(provider) === "D'CENT"
2829
? typeof provider.enable === 'function'
2930
? createModernProviderInterface(provider)
3031
: createLegacyProviderInterface(provider)
3132
: null
3233
}
3334
},
3435
type: 'injected',
35-
link: 'https://link.dcentwallet.com/DAppBrowser/?url='+ encodedUrl ,
36+
link: 'https://link.dcentwallet.com/DAppBrowser/?url=' + encodedUrl,
3637
installMessage: extensionInstallMessage,
3738
mobile: true,
3839
preferred

src/modules/select/wallets/liquality.ts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,35 @@ import liqualityIcon from '../wallet-icons/icon-liquality.png'
55
import liqualityIcon2x from '../wallet-icons/icon-liquality@2x.png'
66

77
function liquality(options: CommonWalletOptions): WalletModule {
8-
const { preferred, label, iconSrc, svg } = options
8+
const { preferred, label, iconSrc, svg } = options
99

10-
return {
11-
name: label || 'Liquality',
12-
iconSrc: iconSrc || liqualityIcon,
13-
iconSrcSet: iconSrc || liqualityIcon2x,
14-
svg,
15-
wallet: async (helpers: Helpers) => {
16-
const { getProviderName, createModernProviderInterface } = helpers
10+
return {
11+
name: label || 'Liquality',
12+
iconSrc: iconSrc || liqualityIcon,
13+
iconSrcSet: iconSrc || liqualityIcon2x,
14+
svg,
15+
wallet: async (helpers: Helpers) => {
16+
const { getProviderName, createModernProviderInterface } = helpers
1717

18-
const provider =
19-
(window as any).ethereum ||
20-
((window as any).web3 && (window as any).web3.currentProvider)
18+
const provider =
19+
(window as any).ethereum ||
20+
((window as any).web3 && (window as any).web3.currentProvider)
2121

22-
return {
23-
provider,
24-
interface:
25-
(getProviderName(provider) === 'Liquality' &&
26-
createModernProviderInterface(provider)) ||
27-
null
28-
}
29-
},
30-
type: 'injected',
31-
link: 'https://liquality.io',
32-
installMessage: extensionInstallMessage,
33-
desktop: true,
34-
mobile: false,
35-
preferred
36-
}
22+
return {
23+
provider,
24+
interface:
25+
(getProviderName(provider) === 'Liquality' &&
26+
createModernProviderInterface(provider)) ||
27+
null
28+
}
29+
},
30+
type: 'injected',
31+
link: 'https://liquality.io',
32+
installMessage: extensionInstallMessage,
33+
desktop: true,
34+
mobile: false,
35+
preferred
36+
}
3737
}
3838

3939
export default liquality

src/modules/select/wallets/providerEngine.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function createProvider(config: any) {
1616
processMessage,
1717
processPersonalMessage,
1818
signMessage,
19-
signPersonalMessage,
19+
signPersonalMessage
2020
} = config
2121

2222
const pollingInterval = get(app).blockPollingInterval
@@ -36,7 +36,7 @@ function createProvider(config: any) {
3636
rpcUrl: rpcUrl.includes('http') ? rpcUrl : `https://${rpcUrl}`
3737
})
3838

39-
const provider = new Web3ProviderEngine({pollingInterval})
39+
const provider = new Web3ProviderEngine({ pollingInterval })
4040

4141
provider.addProvider(new SubscriptionSubprovider())
4242
provider.addProvider(new FilterSubprovider())

src/modules/select/wallets/tokenpocket.ts

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,34 @@ import tokenpocketIcon from '../wallet-icons/icon-tokenpocket.png'
55
import tokenpocketIcon2x from '../wallet-icons/icon-tokenpocket@2x.png'
66

77
function tokenpocket(options: CommonWalletOptions): WalletModule {
8-
const { preferred, label, iconSrc, svg } = options
8+
const { preferred, label, iconSrc, svg } = options
99

10-
return {
11-
name: label || 'TokenPocket',
12-
iconSrc: iconSrc || tokenpocketIcon,
13-
iconSrcSet: iconSrc || tokenpocketIcon2x,
14-
svg,
15-
wallet: async (helpers: Helpers) => {
16-
const { getProviderName, createModernProviderInterface } = helpers
10+
return {
11+
name: label || 'TokenPocket',
12+
iconSrc: iconSrc || tokenpocketIcon,
13+
iconSrcSet: iconSrc || tokenpocketIcon2x,
14+
svg,
15+
wallet: async (helpers: Helpers) => {
16+
const { getProviderName, createModernProviderInterface } = helpers
1717

18-
const provider =
19-
(window as any).ethereum ||
20-
((window as any).web3 && (window as any).web3.currentProvider)
18+
const provider =
19+
(window as any).ethereum ||
20+
((window as any).web3 && (window as any).web3.currentProvider)
2121

22-
return {
23-
provider,
24-
interface:
25-
(getProviderName(provider) === 'TokenPocket' &&
26-
createModernProviderInterface(provider)) ||
27-
null
28-
}
29-
},
30-
type: 'injected',
31-
link: 'https://tokenpocket.pro',
32-
installMessage: mobileWalletInstallMessage,
33-
mobile: true,
34-
preferred
35-
}
22+
return {
23+
provider,
24+
interface:
25+
(getProviderName(provider) === 'TokenPocket' &&
26+
createModernProviderInterface(provider)) ||
27+
null
28+
}
29+
},
30+
type: 'injected',
31+
link: 'https://tokenpocket.pro',
32+
installMessage: mobileWalletInstallMessage,
33+
mobile: true,
34+
preferred
35+
}
3636
}
3737

3838
export default tokenpocket

src/modules/select/wallets/torus.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ function torus(options: TorusOptions & { networkId: number }): WalletModule {
2828
svg: svg || torusIcon,
2929
iconSrc,
3030
wallet: async (helpers: Helpers) => {
31-
const {
32-
createModernProviderInterface
33-
} = helpers
31+
const { createModernProviderInterface } = helpers
3432

3533
const { default: Torus } = await import('@toruslabs/torus-embed')
3634
const instance = new Torus({
@@ -66,7 +64,7 @@ function torus(options: TorusOptions & { networkId: number }): WalletModule {
6664
const result = await instance.login({ verifier: loginMethod })
6765
return { message: result[0] }
6866
},
69-
disconnect: () => instance.cleanUp(),
67+
disconnect: () => instance.cleanUp()
7068
},
7169
instance
7270
}

src/modules/select/wallets/wallet-connect.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ import walletConnectIcon from '../wallet-icons/icon-wallet-connect'
88

99
import { get } from 'svelte/store'
1010

11-
import {
12-
app,
13-
} from '../../../stores'
11+
import { app } from '../../../stores'
1412

1513
function walletConnect(
1614
options: WalletConnectOptions & { networkId: number }

src/modules/select/wallets/wallet-io.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ function walletIoWallet(options: InjectedWithBalanceOptions): WalletModule {
1919
(window as any).ethereum ||
2020
((window as any).web3 && (window as any).web3.currentProvider)
2121

22-
const isWalleIoWallet =
23-
getProviderName(walletIoProvider) === 'wallet.io'
22+
const isWalleIoWallet = getProviderName(walletIoProvider) === 'wallet.io'
2423
let createProvider
2524

2625
if (isWalleIoWallet && rpcUrl) {

0 commit comments

Comments
 (0)