Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
Add BUSD token for BSC
Browse files Browse the repository at this point in the history
  • Loading branch information
0xBuzzLightyear committed Jul 23, 2023
1 parent a3d6854 commit 2178bf4
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 10 deletions.
14 changes: 14 additions & 0 deletions internal/service/blockchain/currencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,20 @@
"type": "token",
"name": "USDT",
"tokenAddress": "0x55d398326f99059fF775485246999027B3197955",
"testTokenAddress": "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd",
"decimals": "18",
"networkId": "56",
"testNetworkId": "97",
"minimal_withdrawal_amount_usd": "10",
"minimal_instant_internal_transfer_amount_usd": "30"
},
{
"blockchain": "BSC",
"blockchainName": "BNB Chain",
"ticker": "BSC_BUSD",
"type": "token",
"name": "BUSD",
"tokenAddress": "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56",
"testTokenAddress": "0xed24fc36d5ee211ea25a80239fb8c4cfd80f12ee",
"decimals": "18",
"networkId": "56",
Expand Down
12 changes: 12 additions & 0 deletions ui-dashboard/src/assets/icons/crypto/busd.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 3 additions & 8 deletions ui-dashboard/src/pages/balance-page/balance-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,10 @@ const BalancePage: React.FC = () => {
const {merchantId} = useSharedMerchantId();

const renderIconName = (name: string) => {
if (name.length < 4) {
return name;
}

if (name.slice(-4) == "usdt") {
return "usdt";
}
// ETH or ETH_USDT => "eth" or "usdt"
const lowered = name.toLowerCase();

return name;
return lowered.includes("_") ? lowered.split("_")[1] : lowered;
};

const balancesColumns: ColumnsType<MerchantBalance> = [
Expand Down
8 changes: 6 additions & 2 deletions ui-dashboard/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ const BLOCKCHAIN_TICKER = [
"MATIC_USDC",
"TRON",
"TRON_USDT",
"BNB"
"BNB",
"BSC_USDT",
"BSC_BUSD"
] as const;

type BlockchainTicker = typeof BLOCKCHAIN_TICKER[number];
Expand Down Expand Up @@ -98,7 +100,9 @@ const CURRENCY_SYMBOL: Record<CurrencyWithFiat, string> = {
MATIC_USDC: "",
TRON: "",
TRON_USDT: "",
BNB: ""
BNB: "",
BSC_USDT: "",
BSC_BUSD: ""
};

type PaymentType = "payment" | "withdrawal";
Expand Down
12 changes: 12 additions & 0 deletions ui-payment/src/assets/icons/crypto/busd.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2178bf4

Please sign in to comment.