Skip to content

Commit

Permalink
feat: blockwallet support (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
Addminus authored Apr 21, 2022
1 parent 3dbfdef commit 1f5a508
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/wallet-management/walletIcons/blockwallet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions packages/wallet-management/walletIcons/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import metamask from './metaMask.svg';
import alphawallet from './alphawallet.svg';
import atoken from './atoken.svg';
import blockwallet from './blockwallet.svg';
import binance from './binance.svg';
import bitpie from './bitpie.svg';
import blankwallet from './blankwallet.svg';
Expand Down Expand Up @@ -31,6 +32,7 @@ export const walletIcons = {
mathwallet,
alphawallet,
atoken,
blockwallet,
binance,
bitpie,
blankwallet,
Expand Down
12 changes: 12 additions & 0 deletions packages/wallet-management/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export interface Wallet {
enum ProviderIdentityFlag {
AlphaWallet = 'isAlphaWallet',
AToken = 'isAToken',
BlockWallet = 'isBlockWallet',
Binance = 'bbcSignTx',
Bitpie = 'isBitpie',
BlankWallet = 'isBlank',
Expand Down Expand Up @@ -74,6 +75,16 @@ const mathWallet: Wallet = {
platforms: ['all'],
};

const blockWallet: Wallet = {
name: 'BlockWallet',
checkProviderIdentity: ({ provider }) =>
!!provider && !!provider[ProviderIdentityFlag.BlockWallet],
icon: walletIcons.blockwallet,
connector: metaMask,

platforms: ['desktop'],
};

const binance: Wallet = {
name: 'Binance',
checkProviderIdentity: ({ provider }) =>
Expand Down Expand Up @@ -306,6 +317,7 @@ export const supportedWallets = [
status,
alphawallet,
atoken,
blockWallet,
bitpie,
blankwallet,
brave,
Expand Down

0 comments on commit 1f5a508

Please sign in to comment.