-
Notifications
You must be signed in to change notification settings - Fork 526
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #732 from blocknative/release/1.35.3
Release: 1.35.3 - Main
- Loading branch information
Showing
7 changed files
with
460 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const blankwalletIcon = ` | ||
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 30C23.2843 30 30 23.2843 30 15C30 6.71573 23.2843 0 15 0C6.71573 0 0 6.71573 0 15C0 23.2843 6.71573 30 15 30ZM23.125 6.875H6.875V23.125H23.125V6.875Z" fill="currentColor"/> | ||
</svg> | ||
` | ||
|
||
export default blankwalletIcon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { extensionInstallMessage } from '../content' | ||
import { WalletModule, Helpers, CommonWalletOptions } from '../../../interfaces' | ||
|
||
import blankwalletIcon from '../wallet-icons/icon-blankwallet' | ||
|
||
function blankwallet(options: CommonWalletOptions): WalletModule { | ||
const { preferred, label, iconSrc, svg } = options | ||
|
||
return { | ||
name: label || 'Blank Wallet', | ||
iconSrc, | ||
svg: svg || blankwalletIcon, | ||
wallet: async (helpers: Helpers) => { | ||
const { | ||
getProviderName, | ||
createModernProviderInterface, | ||
createLegacyProviderInterface | ||
} = helpers | ||
|
||
const provider = | ||
(window as any).ethereum || | ||
((window as any).web3 && (window as any).web3.currentProvider) | ||
|
||
return { | ||
provider, | ||
interface: | ||
provider && getProviderName(provider) === 'BlankWallet' | ||
? typeof provider.enable === 'function' | ||
? createModernProviderInterface(provider) | ||
: createLegacyProviderInterface(provider) | ||
: null | ||
} | ||
}, | ||
type: 'injected', | ||
link: `https://www.goblank.io/`, | ||
installMessage: extensionInstallMessage, | ||
desktop: true, | ||
mobile: false, | ||
preferred | ||
} | ||
} | ||
|
||
export default blankwallet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.