Skip to main content

AssetCard

View some asset information and provide shortcuts for ramp, transfers, and faucet.

Before using this component, please make sure you are logged-in.

Before using this component, we assume that you are already familiar with the basic configuration of Portkey.

Feature

Functions enabled in the Mainnet environment

  • Wallet name (e.g., Wallet 01)
  • Asset quantity (e.g. $215.08)
  • Ramp entry (i.e., Buy)
  • Transfer entry (i.e., Send)
  • View personal wallet address and QR code entry (i.e., Receive)

asset card testnet

Functions enabled in the Testnet environment

  • Wallet name (e.g., Wallet 01)
  • Environment information (Dev Mode)
  • Transfer entry (i.e., Send)
  • View personal wallet address and QR code entry (i.e., Receive)
  • Faucet entry to claim test tokens (i.e., Faucet)

asset card testnet

Usage

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

const App: React.FC = () => {
return (
<AssetCard
isShowRamp={true}
isShowFaucet={true}
networkType="MAINNET"
backIcon={<></>} // bind react node
nickName={'Wallet Name'}
accountBalanceUSD={'$100.00'}
onBack={} // bind function
onBuy={} // bind function
onReceive={} // bind function
onFaucet={} // bind function
/>;
);
};

export default App;

TypeScript

Property
Description
Type
Required
Default
Version
backIconBack button that controls the display of page headerReactNodefalse
networkTypeControl network typeNetworkType, 'MAINNET' | 'TESTNET'falseV2.0.0
nickNameDisplay wallet namestringfalse
accountBalanceUSDDisplay asset quantitystringfalse
isShowRampIs ramp shownbooleanfalse
isShowFaucetIs faucet shownbooleanfalse
onBuyThe event of clicking the buy button() => voidfalse
onBackThe event of clicking the back button on header() => voidfalse
onFaucetThe event of clicking the faucet button() => voidfalse
onReceiveThe event of clicking the view address button() => voidfalse