Skip to main content

ReceiveCard

Usage scenario:

Display the QR code for receiving tokens.

UI

Recipient's QR code of ELF, aelf MainChain

  • Scan the code with the Portkey App to transfer ELF token on aelf MainChain

Recipient's QR code of ELF, aelf dAppChain

  • Scan the code with the Portkey App to transfer ELF token on aelf dAppChain

Usage

import { ReceiveCard } from '@portkey/did-ui-react';

const App = () => (
<ReceiveCard
receiveInfo={{
address: 'NRMRvewuaidMJMtfz1sHb8XGXWqMhxiBuork1wTYKk9zeSuS6',
name: '',
}}
assetInfo={{
symbol: 'ELF',
tokenContractAddress: 'JRmBduh4nXWi1aXgdUsj5gJrzeZb2LxmrAbf7W99faZSvoAaE',
chainId: 'tDVV',
decimals: 8,
}}
networkType={'TESTNET'}
chainId={'tDVV'}
/>
);

export default App;

API

PropertyDescriptionTypeDefaultVersion
receiveInfoReceiver's info{address:string; name?: string;}-
assetInfoThe close button element{symbol: string;tokenContractAddress: string; chainId: ChainId; decimals: number}-
networkTypeThe current network type'TESTNET' | 'MAINNET'-V2.0.0
titleTitle namestring-
classNameClass name of the top level containerstring-
closeIconThe close buttonReactNode-
symbolIconLink to the current token iconstring-V2.0.0
backIconIcon of the back buttonReactNode-
chainIdThe chain where the receiver is onChainId-
onCancelCallback of cancelling() => void;-