Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

# fix: swingby v3 rebrand (2nd) #290

Merged
merged 2 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@apollo/client": "^3.3.11",
"@moxy/next-router-scroll": "^2.0.3",
"@react-hook/copy": "^2.0.1",
"@swingby-protocol/header": "^2.3.0",
"@swingby-protocol/header": "^2.3.1",
"@swingby-protocol/ip-check": "^2.1.0",
"@swingby-protocol/pulsar": "^3.15.3",
"@swingby-protocol/sdk": "^1.0.0-alpha.134",
Expand Down
5 changes: 3 additions & 2 deletions src/modules/onboard/initOnboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const initOnboard = ({

// Onboard bug: metamask's `preferred` becomes 'false' if gives 'preferred: true' to other wallets
const wallets = [
{ walletName: 'trust' },
{ walletName: 'metamask' },
customWalletConnect({
walletName: 'WalletConnect',
Expand All @@ -40,9 +41,9 @@ export const initOnboard = ({
rpcUrl,
},
{ walletName: 'walletLink', rpcUrl, appName },
{ walletName: 'authereum' },
{ walletName: 'authereum', display: { mobile: false } },
{ walletName: 'lattice', rpcUrl, appName },
{ walletName: 'torus' },
{ walletName: 'torus', display: { mobile: false } },
{ walletName: 'opera' },
{
walletName: 'trezor',
Expand Down
2 changes: 1 addition & 1 deletion src/modules/scenes/Main/Asset/BrowserAsset/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const BrowserAsset = () => {
return (
<>
<Head>
<title>Swingby Explorer | Asset</title>
<title>Swingby Skybridge | Asset</title>
<script
type="text/javascript"
src="https://files.coinmarketcap.com/static/widget/currency.js"
Expand Down
6 changes: 3 additions & 3 deletions src/modules/scenes/Main/Explorer/FloatVolume/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ export const FloatVolume = () => {
);
};

const poolLink = (bridge: SkybridgeBridge) => {
const liquidityLink = (bridge: SkybridgeBridge) => {
return (
<Atag href={`/pool?bridge=${bridge}`} rel="noopener noreferrer" target="_blank">
<Atag href={`/liquidity?bridge=${bridge}`} rel="noopener noreferrer" target="_blank">
<TextLink variant="label">
<FormattedMessage id={'home.network.add-liquidity'} />
</TextLink>
Expand All @@ -138,7 +138,7 @@ export const FloatVolume = () => {
</TextBridge>
<RowBridge>
{networkScan({ bridge })}
{poolLink(bridge)}
{liquidityLink(bridge)}
</RowBridge>
<CoinContainer>{bridgeInfo(dataSkypoolBridge)}</CoinContainer>
</BridgeContainer>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/scenes/Main/Fees/BrowserFees/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const BrowserFees = () => {
return (
<>
<Head>
<title>Swingby Explorer | Fees</title>
<title>Swingby Skybridge | Fees</title>
</Head>
<BrowserFeesContainer>
<BrowserFeesDiv size="bare">
Expand Down
6 changes: 4 additions & 2 deletions src/modules/scenes/Main/Liquidity/AddLiquidity/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
getBridgeSbBtc,
TBtcCurrency,
TSbBTC,
swingbyTextDisplay,
} from '../../../../coins';
import { useGetPoolApr, usePoolWithdrawCoin, useToggleBridge } from '../../../../hooks';
import { useOnboard } from '../../../../onboard';
Expand Down Expand Up @@ -90,7 +91,7 @@ export const AddLiquidity = (props: Props) => {
<>
{poolCurrencies.map((currency: CoinSymbol) => (
<Dropdown.Item onClick={() => setCurrency(currency)} key={currency}>
{<CoinDropDown symbol={currency} />} {currency}
{<CoinDropDown symbol={currency} />} {swingbyTextDisplay(currency)}
</Dropdown.Item>
))}
</>
Expand Down Expand Up @@ -194,6 +195,7 @@ export const AddLiquidity = (props: Props) => {
maximumFractionDigits={2}
minimumFractionDigits={2}
/>
%
</LiquidityAPRValue>
)}
</LiquidityAPR>
Expand All @@ -219,7 +221,7 @@ export const AddLiquidity = (props: Props) => {
target={
<DefaultTarget size="city">
<TargetCoin symbol={currency} />
<TextChosenFilter>{currency} </TextChosenFilter>
<TextChosenFilter>{swingbyTextDisplay(currency)} </TextChosenFilter>
</DefaultTarget>
}
data-testid="dropdown"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const BrowserLiquidity = () => {
return (
<>
<Head>
<title>Swingby Explorer | Liquidity</title>
<title>Swingby Skybridge | Liquidity</title>
</Head>
<NetworkDropdownContainer>
<FormattedMessage id="liquidity.mode.network-select-label" />
Expand Down
6 changes: 5 additions & 1 deletion src/modules/scenes/Main/Liquidity/Withdraw/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,11 @@ export const Withdraw = (props: Props) => {
<FormattedMessage id="liquidity.sbbtc-holding" />
</span>
<span>
<FormattedNumber value={Number(maxAmount)} />
<FormattedNumber
value={Number(maxAmount)}
maximumFractionDigits={18}
minimumFractionDigits={0}
/>
</span>
</AccountIdSbBtcBalanceContainer>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const BrowserMetanodes = () => {
return (
<>
<Head>
<title>Swingby Explorer | Metanodes</title>
<title>Swingby Skybridge | Metanodes</title>
</Head>
<BrowserMetanodesContainer>
<BrowserMetanodesDiv size="bare">
Expand Down
2 changes: 1 addition & 1 deletion src/modules/scenes/Main/Pool/BrowserPool/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const BrowserPool = () => {
return (
<>
<Head>
<title>Swingby Explorer | Pool</title>
<title>Swingby Skybridge | Pool</title>
</Head>
<BrowserPoolContainer>
<BrowserPoolDiv size="bare">
Expand Down
2 changes: 1 addition & 1 deletion src/modules/scenes/Main/Swap/BrowserSwap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const BrowserSwap = () => {
return (
<>
<Head>
<title>Swingby Explorer | Swap</title>
<title>Swingby Skybridge | Swap</title>
</Head>
<NetworkDropdownContainer>
<FormattedMessage id="swap.mode.network-select-label" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const BrowserSwapRewards = () => {
return (
<>
<Head>
<title>Swingby Explorer | Swap Rewards</title>
<title>Swingby Skybridge | Swap Rewards</title>
</Head>
<BrowserSwapRewardsContainer>
<BrowserSwapRewardsDiv size="bare">
Expand Down
2 changes: 1 addition & 1 deletion src/modules/scenes/Main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const Main = () => {
return (
<>
<Head>
<title>Swingby Explorer</title>
<title>Swingby Skybridge</title>
</Head>
<ExplorerMain />
</>
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3510,10 +3510,10 @@
eslint-plugin-react "^7.21.5"
eslint-plugin-react-hooks "^4.2.0"

"@swingby-protocol/header@^2.3.0":
version "2.3.0"
resolved "https://registry.yarnpkg.com/@swingby-protocol/header/-/header-2.3.0.tgz#55e41c5d4e9e98801ecff71826f1f9ab0ba7ea2b"
integrity sha512-mGngTUR/7Ed6Lg0xFejXyTFTNZlZMe0Uz39m/oU6rubx7dDX4liHQ7fV8YWST/6lnBMo5HGOP0NQbLfVE+VxYA==
"@swingby-protocol/header@^2.3.1":
version "2.3.1"
resolved "https://registry.yarnpkg.com/@swingby-protocol/header/-/header-2.3.1.tgz#febcfcc36f9817c77d0bbd5b3666f3e96db1db2d"
integrity sha512-48Ft5zb/AuWYmufIfjNHU8fNnnkKSqx/zFV+ibO9Tew/vN+n8rStQDdBqj3KgnET8srcbEKTVOvktyUuXUk5/A==

"@swingby-protocol/ip-check@^2.1.0":
version "2.1.0"
Expand Down