From 9010440c6a387f219b05c9538acb590a513f2841 Mon Sep 17 00:00:00 2001 From: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com> Date: Mon, 9 May 2022 17:43:33 -0700 Subject: [PATCH] add USDC display and open fee switcher (#159) --- .../src/components/mainMenu/feeSwitcher/FeeSwitcher.js | 7 ++++--- packages/boba/gateway/src/containers/wallet/token/Token.js | 2 ++ packages/boba/gateway/src/util/amountConvert.js | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/boba/gateway/src/components/mainMenu/feeSwitcher/FeeSwitcher.js b/packages/boba/gateway/src/components/mainMenu/feeSwitcher/FeeSwitcher.js index 1c9878dc1a..2a277d7765 100644 --- a/packages/boba/gateway/src/components/mainMenu/feeSwitcher/FeeSwitcher.js +++ b/packages/boba/gateway/src/components/mainMenu/feeSwitcher/FeeSwitcher.js @@ -126,9 +126,10 @@ function FeeSwitcher() { return null } - if (network === 'mainnet' && monsterNumber < 1) { - return null - } + // enable fee switcher for everyone + // if (network === 'mainnet' && monsterNumber < 1) { + // return null + // } return ( diff --git a/packages/boba/gateway/src/containers/wallet/token/Token.js b/packages/boba/gateway/src/containers/wallet/token/Token.js index 9163f2471a..6b3b38f9bf 100644 --- a/packages/boba/gateway/src/containers/wallet/token/Token.js +++ b/packages/boba/gateway/src/containers/wallet/token/Token.js @@ -105,6 +105,8 @@ function TokenPage() { return 'boba-network' } else if(i.symbolL1 === 'OLO') { return 'oolongswap' + } else if(i.symbolL1 === 'USDC') { + return 'usd-coin' } else { return i.symbolL1.toLowerCase() } diff --git a/packages/boba/gateway/src/util/amountConvert.js b/packages/boba/gateway/src/util/amountConvert.js index 75238ee8cc..6cd68a6870 100644 --- a/packages/boba/gateway/src/util/amountConvert.js +++ b/packages/boba/gateway/src/util/amountConvert.js @@ -65,6 +65,8 @@ export function amountToUsd(amount, lookupPrice, token) { return amount * lookupPrice['oolongswap'].usd } else if (token.symbol === 'OMG' && !!lookupPrice[ 'omisego' ]) { return amount * lookupPrice['omisego'].usd + } else if (token.symbol === 'USDC' && !!lookupPrice[ 'usd-coin' ]) { + return amount * lookupPrice['usd-coin'].usd } else if (!!lookupPrice[ token.symbol.toLowerCase() ]) { return amount * lookupPrice[token.symbol.toLowerCase()].usd } else {