Add wallets into Astar Portal
Overview
Users can connect to Astar portal using both EVM and Substrate based wallets. Below are the basic steps and important links needed to integrate a new wallet into the Astar portal.
How to integrate
Developers can create a PR to our portal for adding wallets to our portal. We'll walk you through the steps below.
Define the wallet 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 wallet information
For Substrate wallets, add 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,
},
};
For Ethereum wallets, add 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 must test sending transactions from our portal. Perform basic tests using the guide below:
- 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 connect, a transaction, and account switch visual interactions.
-
Deploy the forked app and submit the staging URL (ref).