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

225 wallet issued found during walk through #238

Merged
merged 7 commits into from
May 15, 2024
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- Update poolAddress & pooldetail logic for all Sends [#227] (https://github.com/asgardex/asgardex-desktop/pull/232)
- Fix EVM send Dollar value bug [#230] (https://github.com/asgardex/asgardex-desktop/pull/231)
- Fix Mayachain liquidity charts & stats [#224] (https://github.com/asgardex/asgardex-desktop/pull/234)
- Improve Asset page performance & update Total title [#225] (https://github.com/asgardex/asgardex-desktop/pull/238)

# 1.21.6 (2024-04-24)

Expand Down
4 changes: 2 additions & 2 deletions src/renderer/components/Bonds/table/helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'

import { StopOutlined } from '@ant-design/icons'
import { Network } from '@xchainjs/xchain-client'
import { MayaChain } from '@xchainjs/xchain-mayachain-query'
import { MAYAChain } from '@xchainjs/xchain-mayachain'
import { THORChain } from '@xchainjs/xchain-thorchain'
import { NodeStatusEnum } from '@xchainjs/xchain-thornode'
import { Address, baseToAsset, formatAssetAmountCurrency } from '@xchainjs/xchain-util'
Expand All @@ -17,7 +17,7 @@ export const NodeAddress: React.FC<{ address: Address; network: Network }> = ({
<Col xs={18} lg={20} xl={24}>
<Styled.AddressEllipsis
address={address}
chain={address.startsWith('thor') ? THORChain : MayaChain}
chain={address.startsWith('thor') ? THORChain : MAYAChain}
network={network}
/>
</Col>
Expand Down
5 changes: 4 additions & 1 deletion src/renderer/components/deposit/add/SymDeposit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import { WalletType } from '../../../../shared/wallet/types'
import { ZERO_ASSET_AMOUNT, ZERO_BASE_AMOUNT } from '../../../const'
import {
convertBaseAmountDecimal,
getArbTokenAddress,
getAvaxTokenAddress,
getBscTokenAddress,
getEthTokenAddress,
Expand Down Expand Up @@ -468,7 +469,7 @@ export const SymDeposit: React.FC<Props> = (props) => {
oPoolAddress,
O.chain(({ router }) => router)
)
//tobeFixed

const oTokenAddress: O.Option<string> = (() => {
switch (chain) {
case ETHChain:
Expand All @@ -477,6 +478,8 @@ export const SymDeposit: React.FC<Props> = (props) => {
return getAvaxTokenAddress(asset)
case BSCChain:
return getBscTokenAddress(asset)
case ARBChain:
return getArbTokenAddress(asset)
default:
return O.none
}
Expand Down
10 changes: 3 additions & 7 deletions src/renderer/components/swap/Swap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ import { BSCChain } from '@xchainjs/xchain-bsc'
import { Network } from '@xchainjs/xchain-client'
import { ETHChain } from '@xchainjs/xchain-ethereum'
import { AssetCacao } from '@xchainjs/xchain-mayachain'
import {
isCacaoAsset,
MayachainQuery,
QuoteSwap,
QuoteSwapParams as QuoteSwapParamsMaya
} from '@xchainjs/xchain-mayachain-query'
import { MayachainQuery, QuoteSwap, QuoteSwapParams as QuoteSwapParamsMaya } from '@xchainjs/xchain-mayachain-query'
import { AssetRuneNative, THORChain } from '@xchainjs/xchain-thorchain'
import { InboundDetail, QuoteSwapParams, ThorchainQuery, TxDetails } from '@xchainjs/xchain-thorchain-query'
import {
Expand Down Expand Up @@ -76,7 +71,8 @@ import {
max1e10BaseAmount,
getArbTokenAddress,
isArbTokenAsset,
isAethAsset
isAethAsset,
isCacaoAsset
} from '../../helpers/assetHelper'
import {
getChainAsset,
Expand Down
23 changes: 12 additions & 11 deletions src/renderer/components/wallet/assets/AssetDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ export const AssetDetails: React.FC<Props> = (props): JSX.Element => {
const intl = useIntl()

const isHaltedChain = haltedChains.includes(chain)
const disableSwap = isHaltedChain || AssetHelper.isMayaAsset(asset) || asset.synth
const disableAdd = isHaltedChain || asset.synth || AssetHelper.isMayaAsset(asset)
const disableSwap = isHaltedChain || AssetHelper.isMayaAsset(asset)
const disableAdd = isHaltedChain || AssetHelper.isMayaAsset(asset)

// If the chain is not halted, perform the action

Expand Down Expand Up @@ -189,15 +189,16 @@ export const AssetDetails: React.FC<Props> = (props): JSX.Element => {
disabled={disableSwap}>
{intl.formatMessage({ id: 'common.swap' })}
</FlatButton>
<FlatButton
className="m-2 ml-2 min-w-[200px]"
size="large"
color="primary"
onClick={disableAdd ? undefined : walletActionManageClick}
disabled={disableAdd}>
{intl.formatMessage({ id: 'common.manage' })}
</FlatButton>

{!asset.synth && (
<FlatButton
className="m-2 ml-2 min-w-[200px]"
size="large"
color="primary"
onClick={disableAdd ? undefined : walletActionManageClick}
disabled={disableAdd}>
{intl.formatMessage({ id: 'common.manage' })}
</FlatButton>
)}
{AssetHelper.isRuneNativeAsset(asset) && (
<BorderButton
className="m-2 ml-2 min-w-[200px]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ const Template = (args: Partial<Record<EnabledChain, RDStatus>>) => {
poolDetails={[]}
poolDetailsMaya={[]}
pendingPoolDetails={[]}
pendingPoolDetailsMaya={[]}
pendingPoolsDetailsMaya={[]}
poolsData={{}}
poolsDataMaya={{}}
pricePool={RUNE_PRICE_POOL}
Expand Down
Loading