ETransfer
  • About ETransfer
    • Introduction
    • Business process
      • Deposit process
      • Withdraw process
  • ⚒️SDK
    • SDK introduction
    • SDK change log
    • Get Started
      • 📥Installation
      • 📃Configuration
      • ⌨️Quick Start
      • 🔐Auth
      • 💰Deposit Digital Assets
      • 💰Withdraw Digital Assets
      • ⚒️UI SDK
        • Configuration
        • Deposit Component
        • Withdraw Component
        • History Component
        • Transfer Detail Component
        • ETransfer Content Component
  • Install portkey wallet
  • FAQ
  • Contact us
  • MORE INFORMATION
    • Terms of Service
    • Privacy Policy
Powered by GitBook
On this page
  • Introduction
  • Feature
  • How to use
  • Installation
  • Config
  • Example
  • Notes
  • Contact Us
  1. SDK
  2. Get Started
  3. UI SDK

Transfer Detail Component

PreviousHistory ComponentNextETransfer Content Component

Last updated 7 months ago

Introduction

If you want to quickly integrate the transaction details viewing feature, please use this UI component. You will get the same UI display and querying historical records function as the .

Feature

Transfer Detail functions and UIs are as follows:

  • Display transaction steps and status.

  • Show transaction hash, address, token and amount.

  • Update the transaction progress in real-time while staying on the page.

How to use

Installation

npm install @etransfer/ui-react
# OR
yarn add @etransfer/ui-react

Config

Example

import React from 'react';
import {
  ComponentStyle,
  TransferDetail,
  ETransferConfig,
  ETransferLayoutProvider
  ETransferStyleProvider,
} from '@etransfer/ui-react';
import '@etransfer/ui-react/dist/assets/index.css';

export default function ETransferLayout({ children }: { children: React.ReactNode }) {
  ETransferConfig.setConfig({
    networkType: 'MAINNET', // 'MAINNET' | 'TESTNET'
    etransferUrl: 'etransfer service url',
    authorization: {
      jwt: 'Bearer xxx', // ETransfer authorization token
    },
  });

  return (
    <ETransferStyleProvider>
     <ETransferLayoutProvider>
        <TransferDetail
          className={'xxx-transfer-detail'}
          componentStyle={ComponentStyle.Mobile} // or ComponentStyle.Web
          orderId={'detailId'}
          isShowBackElement={true}
          isShowMobilePoweredBy={false}
          onBack={() => {
            // your logic
          }}
        />
      </ETransferLayoutProvider>
    </ETransferStyleProvider>
  );
}

Component properties

Field

Type

Required

Remarks

className

string

false

The additional class to TransferDetail.

componentStyle

ComponentStyle

false

Component style configuration items.

ComponentStyle.Mobile is a UI that is better adapted to mobile size.

ComponentStyle.Web is a UI that is better adapted to web size.

If you want to configure responsiveness, please switch the UI style at the appropriate time.

Default is ComponentStyle.Web

orderId

string

true

Transaction order ID.

isShowBackElement

boolean

false

Whether to display the back element.

Default is true.

isShowMobilePoweredBy

boolean

false

Whether to display the mobile Powered By ETransfer logo.

onBack

()=void

false

The click event for the back icon.

Notes

  • Ensure that the network configuration (networkType) , service URL (etransferUrl) , authorization URL (etransferAuthUrl) and authorization (jwt) are accurate.

  • Use a valid JWT token to ensure proper functionality.

More Example

Contact Us

For any questions, please reach out to contact@etransfer.exchange.

See More:

For the ETransferConfig, ETransferStyleProvider ,ETransferLayoutProvider configuration used in the following examples, please refer to the .

To get ETransferConfig authorization.jwt, you can read

If you want to use the History and TransferDetail components together, please refer to the and .

⚒️
⚒️
Installation | ETransfer
ETransfer UI SDK configuration
ETransfer SDK Auth
ETransfer UI SDK History Component
github example code
ETransfer app