Add wallets into Astar Portal
Overview
Users can connect to Astar portal using both EVM and Substrate based wallets. Here’s what you need to know about the integration of the wallets into Astar portal.
How to integrate
Developers can create a PR to our portal for adding wallets to our portal. Here’s what you need to know about the integration of Substrate and Ethereum wallets into our portal.
Define the wallets variables
The extension name enum
value comes from:
const extensions = await getInjectedExtensions();
console.log('extensions', extensions); -> extensions[index] -> name
- Add the
extension name
at the SupportWallet enum. - Add the
SupportWallet.[new_value]
to the WalletModalOption array. - Add the
SupportWallet.[new_value]
to the SubstrateWallets array only if it is a Substrate wallet.
Add the wallets information
Add the Substrate wallets information to the supportWalletObj object variable.
e.g.
export const supportWalletObj = {
[SupportWallet.TalismanNative]: {
img: require('/src/assets/img/logo-talisman.svg'),
name: 'Talisman (Native)',
source: SupportWallet.TalismanNative,
walletUrl: 'https://app.talisman.xyz/',
guideUrl: 'https://app.talisman.xyz/',
isSupportBrowserExtension: true,
isSupportMobileApp: false,
},
};
Add the Ethereum wallets information to the supportEvmWalletObj object variable.
e.g.
export const supportEvmWalletObj = {
[SupportWallet.TalismanEvm]: {
img: require('/src/assets/img/logo-talisman.svg'),
name: 'Talisman (EVM)',
source: SupportWallet.TalismanEvm,
walletUrl: 'https://app.talisman.xyz/',
guideUrl: 'https://app.talisman.xyz/',
isSupportBrowserExtension: true,
isSupportMobileApp: false,
ethExtension: 'talismanEth',
},
};
Add a visual asset representing your wallet
Add a small .svg
or .png
to the assets directory.
Requirements for creating a PR
Developers should have tested sending transactions(see below) from our portal.
- Substrate wallets (Such as Polkadot.js)
- Native token transfer
- XCM assets transfer
- XCM transfer
- Deposit
- Withdrawal
- dApp staking transfer
- Stake
- Withdrawal
- Nomination transfer
- EVM wallets (Such as MetaMask)
- Native token transfer
- ERC20 token transfer
- XC20(XCM assets) token transfer
- XCM transfer
- Withdrawal
- Substrate wallets (Such as Polkadot.js)
Submit the Subscan or Blockscout links (both Astar and Shiden networks) for transaction details of the items listed above.
Submit screen recordings of the connect, a transaction and account switch visual interactions.
Deploy the forked app and submit the staging URL(ref).