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: exchange track order and other bugs #2930

Merged
merged 2 commits into from
Dec 5, 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
4 changes: 2 additions & 2 deletions apps/wallet-mobile/src/TxHistory/ActionsBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const ActionsBanner = ({disabled = false}: {disabled: boolean}) => {
const {openModal, closeModal} = useModal()

const handleOnBuy = () => {
track.walletPageExchangeBottomSheetClicked()
track.walletPageExchangeClicked()

const modalHeight = 320
const modalTextFormattingOptions: BuyInfoFormattingOptions = {
Expand All @@ -59,7 +59,7 @@ export const ActionsBanner = ({disabled = false}: {disabled: boolean}) => {
shelleyTheme
title={strings.proceed}
onPress={() => {
track.walletPageExchangeClicked()
track.walletPageExchangeBottomSheetClicked()
// banxa doesn't support testnet for the sandbox it needs a mainnet address
const sandboxWallet = env.getString('BANXA_TEST_WALLET')
const isMainnet = wallet.networkId !== 300
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const TokenList = () => {
const [filteredTokenList, someInWallet] = React.useMemo(() => {
const list = tokenInfos.filter(filterBySearch(assetSearchTerm)).sort((a, b) => sortTokensByName(a, b, wallet))
const set = new Set(list.map(({id}) => id))
set.delete(wallet.primaryTokenInfo.id)
michaeljscript marked this conversation as resolved.
Show resolved Hide resolved
const someInWallet = walletTokenIds.some((id) => set.has(id))
return [list, someInWallet]
}, [tokenInfos, assetSearchTerm, walletTokenIds, wallet])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export const OpenOrders = () => {
assetFromLabel={assetFromLabel}
assetToLabel={assetToLabel}
assetAmount={`${tokenAmount} ${assetToLabel}`}
assetPrice={`${tokenPrice} ${assetFromLabel}`}
assetPrice={`${tokenPrice} ${assetFromLabel}/${assetToLabel}`}
totalReturned={totalReturned}
fee={fee}
/>,
Expand Down Expand Up @@ -444,9 +444,11 @@ const MainInfo = ({tokenPrice, tokenAmount, date}: {tokenPrice: string; tokenAmo
]
return (
<View>
{orderInfo.map((item, index) => (
<MainInfoWrapper key={index} label={item.label} value={item.value} isLast={index === orderInfo.length - 1} />
))}
{orderInfo.map((item, index) =>
item.value === '' ? null : (
<MainInfoWrapper key={index} label={item.label} value={item.value} isLast={index === orderInfo.length - 1} />
),
)}
</View>
)
}
Expand Down
Loading