From d6836c6b2859a5f91cfd807c50eea516901b48b3 Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Thu, 14 Nov 2024 11:08:07 -0800 Subject: [PATCH 01/67] Fix styling in `BlurBackground.tsx` --- .../__snapshots__/MenuTabs.test.tsx.snap | 21 +- .../__snapshots__/CategoryModal.test.tsx.snap | 42 ++-- .../CountryListModal.test.tsx.snap | 21 +- .../__snapshots__/HelpModal.test.tsx.snap | 21 +- .../__snapshots__/LogsModal.test.tsx.snap | 21 +- .../TextInputModal.test.tsx.snap | 42 ++-- .../WalletListModal.test.tsx.snap | 21 +- .../__snapshots__/SendScene2.ui.test.tsx.snap | 210 +++++++++++------- .../SwapConfirmationScene.test.tsx.snap | 21 +- .../SwapCreateScene.test.tsx.snap | 21 +- .../SwapSuccessScene.test.tsx.snap | 21 +- .../TransactionDetailsScene.test.tsx.snap | 42 ++-- src/components/common/BlurBackground.tsx | 4 +- 13 files changed, 309 insertions(+), 199 deletions(-) diff --git a/src/__tests__/components/__snapshots__/MenuTabs.test.tsx.snap b/src/__tests__/components/__snapshots__/MenuTabs.test.tsx.snap index 88548c5e068..92f8b0bbe48 100644 --- a/src/__tests__/components/__snapshots__/MenuTabs.test.tsx.snap +++ b/src/__tests__/components/__snapshots__/MenuTabs.test.tsx.snap @@ -65,19 +65,14 @@ exports[`MenuTabs should render with loading props 1`] = ` blurType="dark" overlayColor="rgba(0, 0, 0, 0)" style={ - [ - { - "backgroundColor": undefined, - "bottom": 0, - "left": 0, - "position": "absolute", - "right": 0, - "top": 0, - }, - { - "borderRadius": 16, - }, - ] + { + "backgroundColor": undefined, + "bottom": 0, + "left": 0, + "position": "absolute", + "right": 0, + "top": 0, + } } /> { const theme = useTheme() const styles = getStyles(theme) - return + return } /** A blur background WITHOUT rounded corners. For the scene header/footer */ @@ -19,7 +19,7 @@ export const BlurBackgroundNoRoundedCorners = () => { const theme = useTheme() const styles = getStyles(theme) - return + return } const getStyles = cacheStyles((theme: Theme) => ({ From 17f70b374e08ce5e5b29dec80ac417346b95d2e4 Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Wed, 13 Nov 2024 13:21:57 -0800 Subject: [PATCH 02/67] Update `enableToken()` -> `enableTokens()` --- .../scenes/Loans/LoanCreateScene.tsx | 6 ++--- src/util/ActionProgramUtils.ts | 12 ++++----- src/util/CurrencyWalletHelpers.ts | 26 +++++++++++++++---- 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/src/components/scenes/Loans/LoanCreateScene.tsx b/src/components/scenes/Loans/LoanCreateScene.tsx index 9326ac1fd67..828f8d99cd7 100644 --- a/src/components/scenes/Loans/LoanCreateScene.tsx +++ b/src/components/scenes/Loans/LoanCreateScene.tsx @@ -29,7 +29,7 @@ import { EdgeAppSceneProps, NavigationBase } from '../../../types/routerTypes' import { getWalletPickerExcludeWalletIds } from '../../../util/borrowUtils' import { getBorrowPluginIconUri } from '../../../util/CdnUris' import { getCurrencyCode, getTokenId, getTokenIdForced } from '../../../util/CurrencyInfoHelpers' -import { enableToken } from '../../../util/CurrencyWalletHelpers' +import { enableTokenCurrencyCode } from '../../../util/CurrencyWalletHelpers' import { DECIMAL_PRECISION, removeIsoPrefix, truncateDecimals, zeroString } from '../../../util/utils' import { EdgeCard } from '../../cards/EdgeCard' import { FiatAmountInputCard } from '../../cards/FiatAmountInputCard' @@ -67,8 +67,8 @@ export const LoanCreateScene = (props: Props) => { // Force enable tokens required for loan useAsyncEffect( async () => { - await enableToken('WBTC', borrowEngineWallet) - await enableToken('USDC', borrowEngineWallet) + await enableTokenCurrencyCode('WBTC', borrowEngineWallet) + await enableTokenCurrencyCode('USDC', borrowEngineWallet) }, [], 'LoanCreateScene:1' diff --git a/src/util/ActionProgramUtils.ts b/src/util/ActionProgramUtils.ts index c02219f5f73..e9fcb6ca61b 100644 --- a/src/util/ActionProgramUtils.ts +++ b/src/util/ActionProgramUtils.ts @@ -10,7 +10,7 @@ import { BorrowCollateral, BorrowDebt, BorrowEngine } from '../plugins/borrow-pl import { config } from '../theme/appConfig' import { GuiExchangeRates } from '../types/types' import { getToken } from './CurrencyInfoHelpers' -import { enableToken } from './CurrencyWalletHelpers' +import { enableTokenCurrencyCode } from './CurrencyWalletHelpers' import { convertCurrencyFromExchangeRates, convertNativeToExchange, @@ -69,7 +69,7 @@ export const makeAaveCreateActionProgram = async (params: AaveCreateActionParams // If no deposit token provided (i.e. buy from exchange provider), default to WBTC const depositTokenCc = depositToken == null ? 'WBTC' : depositToken.currencyCode - await enableToken(depositTokenCc, borrowEngineWallet) + await enableTokenCurrencyCode(depositTokenCc, borrowEngineWallet) const toTokenId = source.tokenId ?? Object.keys(allTokens).find(tokenId => allTokens[tokenId].currencyCode === 'WBTC') if (toTokenId == null) throw new Error(`makeAaveCreateActionProgram: Cannot find toTokenId`) @@ -148,7 +148,7 @@ export const makeAaveBorrowAction = async (params: AaveBorrowActionParams): Prom // If no borrow token specified (withdraw to bank), default to USDC for intermediate borrow step prior to withdrawing to bank const borrowTokenCc = borrowToken == null ? 'USDC' : borrowToken.currencyCode - await enableToken(borrowTokenCc, borrowEngineWallet) + await enableTokenCurrencyCode(borrowTokenCc, borrowEngineWallet) // TODO: ASSUMPTION: The only borrow destinations are: // 1. USDC @@ -202,7 +202,7 @@ export const makeAaveDepositAction = async ({ // If no deposit token provided (i.e. buy from exchange provider), default to WBTC const depositTokenCc = depositToken == null ? 'WBTC' : depositToken.currencyCode - await enableToken(depositTokenCc, borrowEngineWallet) + await enableTokenCurrencyCode(depositTokenCc, borrowEngineWallet) const allTokens = borrowEngineWallet.currencyConfig.allTokens const tokenId = depositTokenId ?? Object.keys(allTokens).find(tokenId => allTokens[tokenId].currencyCode === 'WBTC') if (tokenId == null) throw new Error(`makeAaveDepositAction: Cannot find tokenId`) @@ -270,7 +270,7 @@ export const makeAaveCloseAction = async ({ // We must ensure the token is enabled to get the user's token balance and // calculate exchange rates - await enableToken(collateralCurrencyCode, wallet) + await enableTokenCurrencyCode(collateralCurrencyCode, wallet) if (debt != null) { const debtTokenId = debt.tokenId @@ -281,7 +281,7 @@ export const makeAaveCloseAction = async ({ // We must ensure the token is enabled to get the user's token balance // and calculate exchange rates - await enableToken(debtCurrencyCode, wallet) + await enableTokenCurrencyCode(debtCurrencyCode, wallet) // #region Swap Validation diff --git a/src/util/CurrencyWalletHelpers.ts b/src/util/CurrencyWalletHelpers.ts index 7a5c0172d5f..4a347725bb8 100644 --- a/src/util/CurrencyWalletHelpers.ts +++ b/src/util/CurrencyWalletHelpers.ts @@ -43,13 +43,29 @@ export const getAvailableBalance = (wallet: EdgeCurrencyWallet, tokenId: EdgeTok return balance } -// TODO: Update to use tokenId. Integrate into the rest of the code base where the deprecated enableTokens is used. -export const enableToken = async (currencyCode: string, wallet: EdgeCurrencyWallet) => { +/** @deprecated - Use `enableTokens()` instead */ +export const enableTokenCurrencyCode = async (currencyCode: string, wallet: EdgeCurrencyWallet) => { const allTokens = wallet.currencyConfig.allTokens const newTokenId = Object.keys(allTokens).find(tokenId => allTokens[tokenId].currencyCode.toUpperCase() === currencyCode.toUpperCase()) if (newTokenId == null) throw Error(`Could not find token ${currencyCode} to add to ${wallet.currencyInfo.currencyCode} wallet`) - const enabledTokenIds = wallet.enabledTokenIds - if (enabledTokenIds.find(enabledTokenId => enabledTokenId === newTokenId) == null) - await showFullScreenSpinner(lstrings.wallet_list_modal_enabling_token, wallet.changeEnabledTokenIds([...enabledTokenIds, newTokenId])) + await enableTokens([newTokenId], wallet) +} + +/** + * Enables tokens in a wallet, if not already enabled. + * - If some tokens are not yet enabled, shows a full screen spinner while they + * get enabled. + * - If the tokens are all already enabled, this function call is a noop. + */ +export const enableTokens = async (newTokenIds: EdgeTokenId[], wallet: EdgeCurrencyWallet) => { + const { enabledTokenIds, currencyConfig } = wallet + const { allTokens } = currencyConfig + + const tokensToEnable = Object.keys(allTokens).filter( + tokenId => newTokenIds.filter(newTokenId => newTokenId != null).includes(tokenId) && !enabledTokenIds.includes(tokenId) + ) + + if (tokensToEnable.length > 0) + await showFullScreenSpinner(lstrings.wallet_list_modal_enabling_token, wallet.changeEnabledTokenIds([...enabledTokenIds, ...tokensToEnable])) } From 913eeef314b08e3c91de4ece3a47525570f5c07b Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Thu, 14 Nov 2024 18:12:07 -0800 Subject: [PATCH 03/67] Ensure tokens on stake scenes --- .../scenes/Staking/StakeModifyScene.tsx | 14 +++++++++++--- .../scenes/Staking/StakeOverviewScene.tsx | 11 ++++++++++- src/util/stakeUtils.ts | 15 ++++++++++++++- 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/src/components/scenes/Staking/StakeModifyScene.tsx b/src/components/scenes/Staking/StakeModifyScene.tsx index cb138642fff..ac2d43f8d42 100644 --- a/src/components/scenes/Staking/StakeModifyScene.tsx +++ b/src/components/scenes/Staking/StakeModifyScene.tsx @@ -4,6 +4,7 @@ import * as React from 'react' import { Image, View } from 'react-native' import { sprintf } from 'sprintf-js' +import { useAsyncEffect } from '../../../hooks/useAsyncEffect' import { useDisplayDenom } from '../../../hooks/useDisplayDenom' import { lstrings } from '../../../locales/strings' import { @@ -23,7 +24,7 @@ import { EdgeAppSceneProps } from '../../../types/routerTypes' import { getCurrencyIconUris } from '../../../util/CdnUris' import { getTokenIdForced, getWalletTokenId } from '../../../util/CurrencyInfoHelpers' import { getWalletName } from '../../../util/CurrencyWalletHelpers' -import { getPolicyIconUris, getPositionAllocations } from '../../../util/stakeUtils' +import { enableStakeTokens, getPolicyIconUris, getPositionAllocations } from '../../../util/stakeUtils' import { toBigNumberString } from '../../../util/toBigNumberString' import { zeroString } from '../../../util/utils' import { EdgeCard } from '../../cards/EdgeCard' @@ -58,8 +59,6 @@ interface Props extends EdgeAppSceneProps<'stakeModify'> { wallet: EdgeCurrencyWallet } -// TODO: Check contentPadding - const StakeModifySceneComponent = (props: Props) => { const { navigation, route, wallet } = props const { modification, title, stakePlugin, stakePolicy, stakePosition } = route.params @@ -104,6 +103,15 @@ const StakeModifySceneComponent = (props: Props) => { // Error message tile contents const [errorMessage, setErrorMessage] = React.useState('') + // Ensure required tokens are enabled + useAsyncEffect( + async () => { + await enableStakeTokens(account, wallet, stakePolicy) + }, + [], + 'StakeModifyScene' + ) + React.useEffect(() => { // Initialize the claim row since the user would never modify the amount if (modification === 'claim' && changeQuoteRequest.nativeAmount === '0') { diff --git a/src/components/scenes/Staking/StakeOverviewScene.tsx b/src/components/scenes/Staking/StakeOverviewScene.tsx index 0dd03c7b928..a19e358715a 100644 --- a/src/components/scenes/Staking/StakeOverviewScene.tsx +++ b/src/components/scenes/Staking/StakeOverviewScene.tsx @@ -13,7 +13,7 @@ import { selectDisplayDenomByCurrencyCode } from '../../../selectors/Denominatio import { useDispatch, useSelector } from '../../../types/reactRedux' import { EdgeSceneProps } from '../../../types/routerTypes' import { getTokenIdForced } from '../../../util/CurrencyInfoHelpers' -import { getAllocationLocktimeMessage, getPolicyIconUris, getPolicyTitleName, getPositionAllocations } from '../../../util/stakeUtils' +import { enableStakeTokens, getAllocationLocktimeMessage, getPolicyIconUris, getPolicyTitleName, getPositionAllocations } from '../../../util/stakeUtils' import { SceneButtons } from '../../buttons/SceneButtons' import { StakingReturnsCard } from '../../cards/StakingReturnsCard' import { SceneWrapper } from '../../common/SceneWrapper' @@ -99,6 +99,15 @@ const StakeOverviewSceneComponent = (props: Props) => { 'StakeOverviewSceneComponent' ) + // Ensure required tokens are enabled + useAsyncEffect( + async () => { + await enableStakeTokens(account, wallet, stakePolicy) + }, + [], + 'StakeOverviewSceneComponent 1' + ) + // Handlers const handleModifyPress = (modification: ChangeQuoteRequest['action'] | 'unstakeAndClaim') => () => { const sceneTitleMap = { diff --git a/src/util/stakeUtils.ts b/src/util/stakeUtils.ts index 78b851b2163..852d802ff0e 100644 --- a/src/util/stakeUtils.ts +++ b/src/util/stakeUtils.ts @@ -1,11 +1,13 @@ import { add } from 'biggystring' -import { EdgeCurrencyInfo, EdgeStakingStatus } from 'edge-core-js' +import { EdgeAccount, EdgeCurrencyInfo, EdgeCurrencyWallet, EdgeStakingStatus, EdgeTokenId } from 'edge-core-js' import { sprintf } from 'sprintf-js' import { formatTimeDate } from '../locales/intl' import { lstrings } from '../locales/strings' import { PositionAllocation, StakePlugin, StakePolicy, StakePolicyFilter, StakePosition } from '../plugins/stake-plugins/types' import { getCurrencyIconUris } from './CdnUris' +import { getTokenIdForced } from './CurrencyInfoHelpers' +import { enableTokens } from './CurrencyWalletHelpers' import { getUkCompliantString } from './ukComplianceUtils' /** @@ -122,3 +124,14 @@ export const getFioStakingBalances = (stakingStatus?: EdgeStakingStatus): FioSta } return stakingBalances } + +export const enableStakeTokens = async (account: EdgeAccount, wallet: EdgeCurrencyWallet, stakePolicy: StakePolicy) => { + const requiredTokenIds: EdgeTokenId[] = [] + for (const stakeAssetInfo of [...stakePolicy.stakeAssets, ...stakePolicy.rewardAssets]) { + const pluginId = wallet.currencyInfo.pluginId + const tokenId = getTokenIdForced(account, pluginId, stakeAssetInfo.currencyCode) + requiredTokenIds.push(tokenId) + } + + await enableTokens(requiredTokenIds, wallet) +} From dae58447810deb2a78d9a6f98282a7a49926c389 Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Fri, 15 Nov 2024 11:43:23 -0800 Subject: [PATCH 04/67] Fix wallet creation logic on `EarnScene` --- src/components/scenes/Staking/EarnScene.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/scenes/Staking/EarnScene.tsx b/src/components/scenes/Staking/EarnScene.tsx index 87b82a1309e..6ccf322c8e5 100644 --- a/src/components/scenes/Staking/EarnScene.tsx +++ b/src/components/scenes/Staking/EarnScene.tsx @@ -143,7 +143,7 @@ export const EarnScene = (props: Props) => { // Filter for wallets that have an open position if "Portfolio" is // selected - const allowedWalletIds = isPortfolioSelected + const allowedPortfolioWalletIds = isPortfolioSelected ? walletStakeInfos.filter(walletStakeInfo => walletStakeInfo.isPositionOpen).map(walletStakePosition => walletStakePosition.wallet.id) : undefined @@ -151,10 +151,10 @@ export const EarnScene = (props: Props) => { )) From 629bd5048d5f5415157df382c65216ef3a7d2c66 Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Fri, 15 Nov 2024 13:41:11 -0800 Subject: [PATCH 05/67] Fix APY display We have a weird situation where we have policies that say they're stable APY with no actual APY values. --- src/components/cards/EarnOptionCard.tsx | 9 +++++++-- src/locales/en_US.ts | 1 + src/locales/strings/enUS.json | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/cards/EarnOptionCard.tsx b/src/components/cards/EarnOptionCard.tsx index 7a45a0b503e..b1d32c2d24e 100644 --- a/src/components/cards/EarnOptionCard.tsx +++ b/src/components/cards/EarnOptionCard.tsx @@ -43,8 +43,13 @@ export function EarnOptionCard(props: Props) { const policyIcons = getPolicyIconUris(currencyInfo, stakePolicy) - const variablePrefix = yieldType === 'stable' ? '' : '~ ' - const apyText = apy == null || apy <= 0 ? lstrings.stake_variable_apy : variablePrefix + sprintf(lstrings.stake_apy_1s, toPercentString(apy / 100)) + let apyText = yieldType === 'variable' ? lstrings.stake_variable_apy : lstrings.stake_stable_apy + + // Fill in the actual numeric apy values, if they exist + if (apy != null && apy > 0) { + const variablePrefix = yieldType === 'stable' ? '' : '~ ' + apyText = variablePrefix + sprintf(lstrings.stake_apy_1s, toPercentString(apy / 100)) + } return ( diff --git a/src/locales/en_US.ts b/src/locales/en_US.ts index 5a1af9f2f85..55653cf1ea5 100644 --- a/src/locales/en_US.ts +++ b/src/locales/en_US.ts @@ -1386,6 +1386,7 @@ const strings = { stake_earning_1s: 'Earning: %1$s', stake_apy_1s: '%1$s APY', + stake_stable_apy: 'Stable APY', stake_variable_apy: 'Variable APY', stake_s_staked: '%s Staked', diff --git a/src/locales/strings/enUS.json b/src/locales/strings/enUS.json index fb1744ad917..28f5c7f5600 100644 --- a/src/locales/strings/enUS.json +++ b/src/locales/strings/enUS.json @@ -1225,6 +1225,7 @@ "stake_earn_1s": "Earn: %1$s", "stake_earning_1s": "Earning: %1$s", "stake_apy_1s": "%1$s APY", + "stake_stable_apy": "Stable APY", "stake_variable_apy": "Variable APY", "stake_s_staked": "%s Staked", "stake_s_earned": "%s Earned", From 5d17db74dd12ef79ef560a4e0c26f732271e4b46 Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Fri, 15 Nov 2024 13:50:03 -0800 Subject: [PATCH 06/67] Clarify asset names in `EarnOptionCard` Use the `displayName` if it exists --- CHANGELOG.md | 3 +++ src/components/cards/EarnOptionCard.tsx | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2e8df69b19..7dd8bea5404 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,10 @@ ## 4.18.0 - added: Close button (X) for `EdgeModals,` specifically if a desktop platform is detected. +- changed: Auto-enable required tokens when navigating to `Stake*` scenes - fixed: Incorrect `SwapInput` amounts on `SwapCreateScene` after changing wallet. +- fixed: Various `EarnScene` display bugs +- fixed: `EarnScene` missing wallet creation option in "Discover" view ## 4.17.0 (2024-11-12) diff --git a/src/components/cards/EarnOptionCard.tsx b/src/components/cards/EarnOptionCard.tsx index b1d32c2d24e..91fb396affc 100644 --- a/src/components/cards/EarnOptionCard.tsx +++ b/src/components/cards/EarnOptionCard.tsx @@ -33,8 +33,8 @@ export function EarnOptionCard(props: Props) { const { apy, yieldType, stakeProviderInfo } = stakePolicy const { stakeAssets, rewardAssets } = stakePolicy - const stakeCurrencyCodes = stakeAssets.map(asset => asset.currencyCode).join(' + ') - const rewardCurrencyCodes = rewardAssets.map(asset => asset.currencyCode).join(', ') + const stakeCurrencyCodes = stakeAssets.map(asset => asset.displayName ?? asset.currencyCode).join(' + ') + const rewardCurrencyCodes = rewardAssets.map(asset => asset.displayName ?? asset.currencyCode).join(', ') const stakeText = sprintf(isOpenPosition ? lstrings.stake_staked_1s : lstrings.stake_stake_1s, stakeCurrencyCodes) const rewardText = isOpenPosition @@ -43,7 +43,7 @@ export function EarnOptionCard(props: Props) { const policyIcons = getPolicyIconUris(currencyInfo, stakePolicy) - let apyText = yieldType === 'variable' ? lstrings.stake_variable_apy : lstrings.stake_stable_apy + let apyText: string = yieldType === 'variable' ? lstrings.stake_variable_apy : lstrings.stake_stable_apy // Fill in the actual numeric apy values, if they exist if (apy != null && apy > 0) { From d3d47788ab588bb922d5d278d22afd3ab1176ad1 Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Wed, 13 Nov 2024 17:02:17 -0800 Subject: [PATCH 07/67] Handle light account backup while on `FiatPluginEnterAmountScene` --- CHANGELOG.md | 1 + .../gui/scenes/FiatPluginEnterAmountScene.tsx | 21 ++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7dd8bea5404..a5823cb9a84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - added: Close button (X) for `EdgeModals,` specifically if a desktop platform is detected. - changed: Auto-enable required tokens when navigating to `Stake*` scenes - fixed: Incorrect `SwapInput` amounts on `SwapCreateScene` after changing wallet. +- fixed: Backing up a light account while on the `FiatPluginEnterAmountScene` retains light account-related quote errors - fixed: Various `EarnScene` display bugs - fixed: `EarnScene` missing wallet creation option in "Discover" view diff --git a/src/plugins/gui/scenes/FiatPluginEnterAmountScene.tsx b/src/plugins/gui/scenes/FiatPluginEnterAmountScene.tsx index 2958f9eb684..594fae1a4e1 100644 --- a/src/plugins/gui/scenes/FiatPluginEnterAmountScene.tsx +++ b/src/plugins/gui/scenes/FiatPluginEnterAmountScene.tsx @@ -13,7 +13,9 @@ import { FilledTextInput } from '../../../components/themed/FilledTextInput' import { MainButton } from '../../../components/themed/MainButton' import { SceneHeader } from '../../../components/themed/SceneHeader' import { useHandler } from '../../../hooks/useHandler' +import { useWatch } from '../../../hooks/useWatch' import { lstrings } from '../../../locales/strings' +import { useSelector } from '../../../types/reactRedux' import { BuyTabSceneProps } from '../../../types/routerTypes' import { getPartnerIconUri } from '../../../util/CdnUris' import { FiatPluginEnterAmountResponse } from '../fiatPluginTypes' @@ -66,7 +68,7 @@ const defaultEnterAmountState: EnterAmountState = { export const FiatPluginEnterAmountScene = React.memo((props: Props) => { const theme = useTheme() const styles = getStyles(theme) - const { route } = props + const { route, navigation } = props const { disableInput, initState, @@ -85,6 +87,9 @@ export const FiatPluginEnterAmountScene = React.memo((props: Props) => { throw new Error('disableInput must be 1 or 2') } const lastUsed = React.useRef(1) + const account = useSelector(state => state.core.account) + const currentUsername = useWatch(account, 'username') + const initUsername = React.useRef(account.username) const stateManager = useStateManager({ ...defaultEnterAmountState, ...initState }) const { value1, value2, poweredBy, spinner1, spinner2, statusText } = stateManager.state @@ -102,6 +107,20 @@ export const FiatPluginEnterAmountScene = React.memo((props: Props) => { } }, [initState?.value1, convertValue, stateManager]) + // Handle light account backups initiated from this scene + useEffect(() => { + if (initUsername.current !== currentUsername) { + // TODO: Doesn't seem to be a straightforward way to update the stale + // fiat plugin with the new username state, so just go back to the + // `GuiPluginListScene` after upgrading. Ideally we somehow + // re-initialize the plugin and automatically end up back on this + // scene... + // For now, simply go back to the `GuiPluginListScene`. + navigation.goBack() + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [currentUsername]) + let headerIcon = null if (headerIconUri != null) { headerIcon = From 9bbe59506b560fbdcae390da610cf13f21bfbe22 Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Tue, 19 Nov 2024 15:08:40 -0800 Subject: [PATCH 08/67] Upgrade edge-currency-monero@^1.3.2 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 30fab851e08..3854b0d5504 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "disklet": "^0.5.2", "edge-core-js": "^2.20.1", "edge-currency-accountbased": "^4.27.1", - "edge-currency-monero": "^1.3.1", + "edge-currency-monero": "^1.3.2", "edge-currency-plugins": "^3.4.4", "edge-exchange-plugins": "^2.14.0", "edge-info-server": "^3.0.1", diff --git a/yarn.lock b/yarn.lock index 6c0179b83c6..221e04ab821 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9375,10 +9375,10 @@ edge-currency-accountbased@^4.27.1: xrpl "^2.10.0" yaob "^0.3.6" -edge-currency-monero@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/edge-currency-monero/-/edge-currency-monero-1.3.1.tgz#1268232bd24ac9bd15a432c4b5bee984ee525909" - integrity sha512-gaeaPPD5r1+uhtlQ1itaiPcLQ2ftFp00wmE1XD/2abikG0DqTINcg7pkPY33VUFUB7WzLvyts4ln0WiZEXy7Jw== +edge-currency-monero@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/edge-currency-monero/-/edge-currency-monero-1.3.2.tgz#2e993cdfea5f25aad42131c206c163023b879273" + integrity sha512-PTU2eCRKBrN01XAA8xUY1y8vIl/ncGaaDNvzh8lL6ZRULQG5q8cXEmJ4uSsSF2laADT8sErsg+ZwJ8COg28r1g== dependencies: "@mymonero/mymonero-bigint" "^1.4.2" "@mymonero/mymonero-money-format" "^1.4.2" From 41178a14a60c3ddec801eccf75c07e43540f1045 Mon Sep 17 00:00:00 2001 From: William Swanson Date: Wed, 20 Nov 2024 11:28:33 -0800 Subject: [PATCH 09/67] Use Fastlane API-key authentication --- .gitignore | 7 ++++--- scripts/deploy.ts | 8 +++----- scripts/secretFiles.ts | 5 +++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 9c38c90eb50..06c90d69612 100644 --- a/.gitignore +++ b/.gitignore @@ -7,13 +7,14 @@ temp/ # Build & deployment files /android/app/google-services.json /android/google-java-format-*.jar -/release-version.json /deploy-config.json +/env.json +/fastlane.json /ios/edge/GoogleService-Info.plist /ios/Pods/ -android-release.bundle.map -env.json +/release-version.json IDEWorkspaceChecks.plist +android-release.bundle.map ios-release.bundle.map keystores/ diff --git a/scripts/deploy.ts b/scripts/deploy.ts index 8a47a01e156..7a3252d324a 100644 --- a/scripts/deploy.ts +++ b/scripts/deploy.ts @@ -184,8 +184,6 @@ function buildIos(buildObj: BuildObj) { chdir(buildObj.guiDir) if ( process.env.BUILD_REPO_URL && - process.env.FASTLANE_USER != null && - process.env.FASTLANE_PASSWORD != null && // process.env.GITHUB_SSH_KEY != null && process.env.HOME != null && process.env.MATCH_KEYCHAIN_PASSWORD != null && @@ -202,13 +200,13 @@ function buildIos(buildObj: BuildObj) { const profileDir = join(process.env.HOME, 'Library', 'MobileDevice', 'Provisioning Profiles') call(`rm -rf ${escapePath(profileDir)}`) call( - `GIT_SSH_COMMAND="ssh -i ${githubSshKey}" fastlane match adhoc --git_branch="${buildObj.appleDeveloperTeamName}" -a ${buildObj.bundleId} --team_id ${buildObj.appleDeveloperTeamId}` + `GIT_SSH_COMMAND="ssh -i ${githubSshKey}" fastlane match adhoc --git_branch="${buildObj.appleDeveloperTeamName}" -a ${buildObj.bundleId} --team_id ${buildObj.appleDeveloperTeamId} --api_key_path fastlane.json` ) call( - `GIT_SSH_COMMAND="ssh -i ${githubSshKey}" fastlane match development --git_branch="${buildObj.appleDeveloperTeamName}" -a ${buildObj.bundleId} --team_id ${buildObj.appleDeveloperTeamId}` + `GIT_SSH_COMMAND="ssh -i ${githubSshKey}" fastlane match development --git_branch="${buildObj.appleDeveloperTeamName}" -a ${buildObj.bundleId} --team_id ${buildObj.appleDeveloperTeamId} --api_key_path fastlane.json` ) call( - `GIT_SSH_COMMAND="ssh -i ${githubSshKey}" fastlane match appstore --git_branch="${buildObj.appleDeveloperTeamName}" -a ${buildObj.bundleId} --team_id ${buildObj.appleDeveloperTeamId}` + `GIT_SSH_COMMAND="ssh -i ${githubSshKey}" fastlane match appstore --git_branch="${buildObj.appleDeveloperTeamName}" -a ${buildObj.bundleId} --team_id ${buildObj.appleDeveloperTeamId} --api_key_path fastlane.json` ) } else { mylog('Missing or incomplete Fastlane params. Not using Fastlane') diff --git a/scripts/secretFiles.ts b/scripts/secretFiles.ts index c7a387a4bfa..ee924ef2704 100644 --- a/scripts/secretFiles.ts +++ b/scripts/secretFiles.ts @@ -14,9 +14,10 @@ const githubSshKey = process.env.GITHUB_SSH_KEY ?? join(baseDir, 'id_github') const filePaths = [ { file: 'deploy-config.json', path: './' }, + { file: 'env.json', path: './' }, + { file: 'fastlane.json', path: './' }, { file: 'GoogleService-Info.plist', path: './ios/edge/' }, - { file: 'google-services.json', path: './android/app/' }, - { file: 'env.json', path: './' } + { file: 'google-services.json', path: './android/app/' } ] async function main() { From cf396a2c0fe85ee8381d97943284f99871ca66b5 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 20 Nov 2024 17:20:44 -0800 Subject: [PATCH 10/67] Upgrade react-native-zcash to v0.9.3 --- ios/Podfile.lock | 4 ++-- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 47b93e3a039..007fe54b498 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -430,7 +430,7 @@ PODS: - react-native-webview (13.8.4): - RCT-Folly (= 2021.07.22.00) - React-Core - - react-native-zcash (0.9.2): + - react-native-zcash (0.9.3): - gRPC-Swift (~> 1.8) - MnemonicSwift (~> 2.2) - React-Core @@ -1141,7 +1141,7 @@ SPEC CHECKSUMS: react-native-safari-view: 955d7160d159241b8e9395d12d10ea0ef863dcdd react-native-safe-area-context: dcab599c527c2d7de2d76507a523d20a0b83823d react-native-webview: fa228e55c53372c2b361d2fa5e415844fa83eabf - react-native-zcash: 8d6da0be327896cd68c623e4d261aab0e497276e + react-native-zcash: f680443d2673032b16e8850b7146b8863ee15484 React-perflogger: 0cc42978a483a47f3696171dac2e7033936fc82d React-RCTActionSheet: ea922b476d24f6d40b8e02ac3228412bd3637468 React-RCTAnimation: 7be2c148398eaa5beac950b2b5ec7102389ec3ad diff --git a/package.json b/package.json index 3854b0d5504..18b6af45dba 100644 --- a/package.json +++ b/package.json @@ -157,7 +157,7 @@ "react-native-vector-icons": "^10.1.0", "react-native-webview": "^13.8.4", "react-native-wheel-picker-android": "^2.0.6", - "react-native-zcash": "^0.9.2", + "react-native-zcash": "^0.9.3", "react-redux": "^8.1.1", "redux": "^4.2.1", "redux-thunk": "^2.3.0", diff --git a/yarn.lock b/yarn.lock index 221e04ab821..af055c0d033 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16675,10 +16675,10 @@ react-native-wheel-picker-android@^2.0.6: dependencies: moment "^2.22.0" -react-native-zcash@^0.9.2: - version "0.9.2" - resolved "https://registry.yarnpkg.com/react-native-zcash/-/react-native-zcash-0.9.2.tgz#411b9ad5985d426809ce43ac107a37c49c59cdc5" - integrity sha512-6vbE6d8AUBmA/1bYR88lkIJps+PmXPFVzZEXKNEfFRy1sz981z6q975Nf3nhw8iAT7LCITjcIC0sZOHY64w7AQ== +react-native-zcash@^0.9.3: + version "0.9.3" + resolved "https://registry.yarnpkg.com/react-native-zcash/-/react-native-zcash-0.9.3.tgz#0304c2e5254957a4d72e5c46a9395e672b18b84d" + integrity sha512-9KvpFP0Mf01gxysOAfRsRp68MPA3Ogoexr5RdOArmPQM+yVHvTUm/70ymTukRA8oePT2NkHeI/u/fLZuaEhUYA== dependencies: biggystring "^4.1.3" rfc4648 "^1.3.0" From 4f5a3157ccf1bbbecb14cef82ccca7b2d0295d7d Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 20 Nov 2024 23:20:50 -0800 Subject: [PATCH 11/67] v4.17.1 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5823cb9a84..a227fd90a84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +## 4.17.1 + +- added: (Zcash) Add NU6 support + ## 4.18.0 - added: Close button (X) for `EdgeModals,` specifically if a desktop platform is detected. From 679cec35d6999a3db0f3a5d1a49bea0239d7592f Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Thu, 21 Nov 2024 10:56:14 -0800 Subject: [PATCH 12/67] Upgrade edge-currency-accountbased@^4.28.0 --- ios/Podfile.lock | 4 ++-- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 007fe54b498..6bcaa07fbbf 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -17,7 +17,7 @@ PODS: - DoubleConversion (1.1.6) - edge-core-js (2.20.1): - React-Core - - edge-currency-accountbased (4.27.1): + - edge-currency-accountbased (4.28.0): - React-Core - edge-currency-plugins (3.4.4): - React-Core @@ -1081,7 +1081,7 @@ SPEC CHECKSUMS: disklet: e7ed3e673ccad9d175a1675f9f3589ffbf69a5fd DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5 edge-core-js: 9264309f29f398da3b714dc5e80702f102f9db2d - edge-currency-accountbased: 3ed33409d304a969392c9e205d115521aab49b8a + edge-currency-accountbased: 298a981da054f4d3a1c3600641c150526560db96 edge-currency-plugins: 95577a282061148263207fad9befe11bb07a57c1 edge-exchange-plugins: 2883457575c970671c5e63e547907dd40234a323 edge-login-ui-rn: 70f8057108ae213e43583a0b3876c88c500c27bc diff --git a/package.json b/package.json index 18b6af45dba..7503478147d 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "detect-bundler": "^1.1.0", "disklet": "^0.5.2", "edge-core-js": "^2.20.1", - "edge-currency-accountbased": "^4.27.1", + "edge-currency-accountbased": "^4.28.0", "edge-currency-monero": "^1.3.2", "edge-currency-plugins": "^3.4.4", "edge-exchange-plugins": "^2.14.0", diff --git a/yarn.lock b/yarn.lock index af055c0d033..f557eb5b740 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9324,10 +9324,10 @@ edge-core-js@^2.20.1: yaob "^0.3.12" yavent "^0.1.3" -edge-currency-accountbased@^4.27.1: - version "4.27.1" - resolved "https://registry.yarnpkg.com/edge-currency-accountbased/-/edge-currency-accountbased-4.27.1.tgz#f932c2e11242967e883625e5e904dbc070cddd34" - integrity sha512-9yMFN1Mbn8PezynM5BN/2wptJMK6eWr25exWWWKLQM4hIlLcaL8sb/ivdeXgmSpx7J0dCQa4w2xwMGKe6zR2nw== +edge-currency-accountbased@^4.28.0: + version "4.28.0" + resolved "https://registry.yarnpkg.com/edge-currency-accountbased/-/edge-currency-accountbased-4.28.0.tgz#1513d9aac63b5bcc0ca89094c2a7fb41a7c1d143" + integrity sha512-0SPiX6JC4HUl9arqJGr4HhHgyi0zdwgg7s1XoMLkggyahUzT+M7CygvCyC3TTdGKhCZkzKqa/Oy44UXbBk2dbA== dependencies: "@binance-chain/javascript-sdk" "^4.2.0" "@chain-registry/client" "^1.15.0" From 039dece9d4f83ab788027a5f5ac897c0f84cb53a Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Wed, 6 Nov 2024 14:29:46 -0800 Subject: [PATCH 13/67] Add support for LLD tx history --- CHANGELOG.md | 1 + src/components/scenes/TransactionDetailsScene.tsx | 10 +++++++++- src/constants/WalletAndCurrencyConstants.ts | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a227fd90a84..c03cd867d47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ## 4.18.0 +- added: Support for LLD & LLM transaction history - added: Close button (X) for `EdgeModals,` specifically if a desktop platform is detected. - changed: Auto-enable required tokens when navigating to `Stake*` scenes - fixed: Incorrect `SwapInput` amounts on `SwapCreateScene` after changing wallet. diff --git a/src/components/scenes/TransactionDetailsScene.tsx b/src/components/scenes/TransactionDetailsScene.tsx index 83410a04f74..4092c5d8871 100644 --- a/src/components/scenes/TransactionDetailsScene.tsx +++ b/src/components/scenes/TransactionDetailsScene.tsx @@ -410,7 +410,15 @@ const TransactionDetailsComponent = (props: Props) => { - + Date: Fri, 22 Nov 2024 01:19:49 -0800 Subject: [PATCH 14/67] Upgrade privacy deps Upgrade react-native-zcash to v0.9.4 Upgrade react-native-piratechain to v0.5.5 --- ios/Podfile.lock | 4 ++-- package.json | 4 ++-- yarn.lock | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 6bcaa07fbbf..bcc67262c55 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -430,7 +430,7 @@ PODS: - react-native-webview (13.8.4): - RCT-Folly (= 2021.07.22.00) - React-Core - - react-native-zcash (0.9.3): + - react-native-zcash (0.9.4): - gRPC-Swift (~> 1.8) - MnemonicSwift (~> 2.2) - React-Core @@ -1141,7 +1141,7 @@ SPEC CHECKSUMS: react-native-safari-view: 955d7160d159241b8e9395d12d10ea0ef863dcdd react-native-safe-area-context: dcab599c527c2d7de2d76507a523d20a0b83823d react-native-webview: fa228e55c53372c2b361d2fa5e415844fa83eabf - react-native-zcash: f680443d2673032b16e8850b7146b8863ee15484 + react-native-zcash: 722050a75f795ad7edfccf12c81202e42c198c9d React-perflogger: 0cc42978a483a47f3696171dac2e7033936fc82d React-RCTActionSheet: ea922b476d24f6d40b8e02ac3228412bd3637468 React-RCTAnimation: 7be2c148398eaa5beac950b2b5ec7102389ec3ad diff --git a/package.json b/package.json index 7503478147d..d24ecc542ce 100644 --- a/package.json +++ b/package.json @@ -142,7 +142,7 @@ "react-native-mymonero-core": "^0.3.1", "react-native-patina": "^0.1.6", "react-native-permissions": "^4.1.5", - "react-native-piratechain": "^0.5.4", + "react-native-piratechain": "^0.5.5", "react-native-reanimated": "^3.14.0", "react-native-reorderable-list": "^0.5.0", "react-native-safari-view": "^2.1.0", @@ -157,7 +157,7 @@ "react-native-vector-icons": "^10.1.0", "react-native-webview": "^13.8.4", "react-native-wheel-picker-android": "^2.0.6", - "react-native-zcash": "^0.9.3", + "react-native-zcash": "^0.9.4", "react-redux": "^8.1.1", "redux": "^4.2.1", "redux-thunk": "^2.3.0", diff --git a/yarn.lock b/yarn.lock index f557eb5b740..e44c212153a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16553,10 +16553,10 @@ react-native-permissions@^4.1.5: resolved "https://registry.yarnpkg.com/react-native-permissions/-/react-native-permissions-4.1.5.tgz#db4d1ddbf076570043f4fd4168f54bb6020aec92" integrity sha512-r6VMRacASmtRHS+GZ+5HQCp9p9kiE+UU9magHOZCXZLTJitdTuVHWZRrb4v4oqZGU+zAp3mZhTQftuMMv+WLUg== -react-native-piratechain@^0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/react-native-piratechain/-/react-native-piratechain-0.5.4.tgz#98b3773abcc8f372773fa263be266b40279cc556" - integrity sha512-TYnT9XRgnb6RrEfEqUBJtqKCwCze/atsvkFKRV8t1HesVq+/CPSJfk1CxFfM3qZIVNNIoB94srFbBKQLQ15V4g== +react-native-piratechain@^0.5.5: + version "0.5.5" + resolved "https://registry.yarnpkg.com/react-native-piratechain/-/react-native-piratechain-0.5.5.tgz#73ba08a04f45b133184b6efea70a2ed5c5cf5160" + integrity sha512-oMntk1SrUWR9BkQeA22onSU8m6VurtHkpXocQSBiqXhX7ZUG/94rbwPuV/OdfzrhXQRYjD71Vfj31T5qS0wZ1A== dependencies: rfc4648 "^1.3.0" @@ -16675,10 +16675,10 @@ react-native-wheel-picker-android@^2.0.6: dependencies: moment "^2.22.0" -react-native-zcash@^0.9.3: - version "0.9.3" - resolved "https://registry.yarnpkg.com/react-native-zcash/-/react-native-zcash-0.9.3.tgz#0304c2e5254957a4d72e5c46a9395e672b18b84d" - integrity sha512-9KvpFP0Mf01gxysOAfRsRp68MPA3Ogoexr5RdOArmPQM+yVHvTUm/70ymTukRA8oePT2NkHeI/u/fLZuaEhUYA== +react-native-zcash@^0.9.4: + version "0.9.4" + resolved "https://registry.yarnpkg.com/react-native-zcash/-/react-native-zcash-0.9.4.tgz#f02f789e3b21548d436cee7633fe321fa4804f7b" + integrity sha512-N6RbuzwshEiZqIdiYbBAcI9+e7MEL8+dhErpJDSMLmbPGYEJAprVUPL/B9HP/lo4PsD5nXv5ll9Q16Zu0J0Uag== dependencies: biggystring "^4.1.3" rfc4648 "^1.3.0" From f38081b04b42443ef1cab2f5ef6c03ffdc3decfd Mon Sep 17 00:00:00 2001 From: Matthew Date: Fri, 22 Nov 2024 01:21:32 -0800 Subject: [PATCH 15/67] v4.17.2 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c03cd867d47..8126149e024 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +## 4.17.2 + +- fixed: (Zcash/Pirate) Fixed android build issues + ## 4.17.1 - added: (Zcash) Add NU6 support From ce375293cef893f88823c7ce849d1a43e917dc97 Mon Sep 17 00:00:00 2001 From: William Swanson Date: Mon, 25 Nov 2024 13:29:30 -0800 Subject: [PATCH 16/67] Upgrade to edge-core-js v2.20.3 --- ios/Podfile.lock | 10 +++++----- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index bcc67262c55..b0fe5404cc8 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -15,7 +15,7 @@ PODS: - disklet (0.5.2): - React - DoubleConversion (1.1.6) - - edge-core-js (2.20.1): + - edge-core-js (2.20.3): - React-Core - edge-currency-accountbased (4.28.0): - React-Core @@ -1079,8 +1079,8 @@ SPEC CHECKSUMS: CNIOLinux: 62e3505f50de558c393dc2f273dde71dcce518da CNIOWindows: 3047f2d8165848a3936a0a755fee27c6b5ee479b disklet: e7ed3e673ccad9d175a1675f9f3589ffbf69a5fd - DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5 - edge-core-js: 9264309f29f398da3b714dc5e80702f102f9db2d + DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 + edge-core-js: 4d014907ea944569225308121d4ec14090a0516c edge-currency-accountbased: 298a981da054f4d3a1c3600641c150526560db96 edge-currency-plugins: 95577a282061148263207fad9befe11bb07a57c1 edge-exchange-plugins: 2883457575c970671c5e63e547907dd40234a323 @@ -1101,7 +1101,7 @@ SPEC CHECKSUMS: FirebaseInstallations: 766dabca09fd94aef922538aaf144cc4a6fb6869 FirebaseMessaging: 585984d0a1df120617eb10b44cad8968b859815e fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 - glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 + glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15 gRPC-Swift: 74adcaaa62ac5e0a018938840328cb1fdfb09e7b @@ -1206,4 +1206,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: a604cb59fd3c1007e2f9b5442f05cf33ac324851 -COCOAPODS: 1.15.2 +COCOAPODS: 1.16.2 diff --git a/package.json b/package.json index d24ecc542ce..eb7f5d062c9 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "deepmerge": "^4.3.1", "detect-bundler": "^1.1.0", "disklet": "^0.5.2", - "edge-core-js": "^2.20.1", + "edge-core-js": "^2.20.3", "edge-currency-accountbased": "^4.28.0", "edge-currency-monero": "^1.3.2", "edge-currency-plugins": "^3.4.4", diff --git a/yarn.lock b/yarn.lock index e44c212153a..0d028fb8520 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9299,10 +9299,10 @@ ed25519@0.0.4: bindings "^1.2.1" nan "^2.0.9" -edge-core-js@^2.20.1: - version "2.20.1" - resolved "https://registry.yarnpkg.com/edge-core-js/-/edge-core-js-2.20.1.tgz#16d938224c31c1d1768a32b3424dd8c953dd4684" - integrity sha512-NK3GwDLucPl2qn7tbY0KotVRKYhSoAN9iqIyw2WPlyH3rDt58+oK85bladI0G1cKNpmStxz1FuTFa7/PKKByUA== +edge-core-js@^2.20.3: + version "2.20.3" + resolved "https://registry.yarnpkg.com/edge-core-js/-/edge-core-js-2.20.3.tgz#aa4bd51d41247c26aae765b04ecd72197e9e548a" + integrity sha512-xouXS5GuLX3jl7N7Wiv2OH8P9Msp+DAOZ4H3L0sRr1X2sjHZ4/ildyisIz0fyABGUnfvPBFh5zXfn3Lvm+WhxQ== dependencies: aes-js "^3.1.0" base-x "^4.0.0" From 78edce372fd05deab6e30db8138626141dd4aac1 Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Fri, 22 Nov 2024 14:41:15 -0800 Subject: [PATCH 17/67] Add `isBuiltinAsset` to `Exchange_Shift_Success` --- CHANGELOG.md | 2 ++ .../scenes/SwapConfirmationScene.tsx | 14 +++++++-- src/util/tracking.ts | 31 ++++++++++++++++++- 3 files changed, 43 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8126149e024..c2995909bf4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- added: `isBuiltInAsset` param for 'Exchange_Shift_Success' tracking event + ## 4.17.2 - fixed: (Zcash/Pirate) Fixed android build issues diff --git a/src/components/scenes/SwapConfirmationScene.tsx b/src/components/scenes/SwapConfirmationScene.tsx index 24e033fd995..da281bdc054 100644 --- a/src/components/scenes/SwapConfirmationScene.tsx +++ b/src/components/scenes/SwapConfirmationScene.tsx @@ -162,7 +162,7 @@ export const SwapConfirmationScene = (props: Props) => { const { fromDisplayAmount, fee, fromFiat, fromTotalFiat, toDisplayAmount, toFiat } = await dispatch(getSwapInfo(selectedQuote)) const { isEstimate, fromNativeAmount, toNativeAmount, networkFee, pluginId, expirationDate, request } = selectedQuote // Both fromCurrencyCode and toCurrencyCode will exist, since we set them: - const { toWallet, toTokenId } = request + const { toWallet, toTokenId, fromWallet, fromTokenId } = request try { dispatch(logEvent('Exchange_Shift_Start')) const result: EdgeSwapResult = await selectedQuote.approve() @@ -199,12 +199,20 @@ export const SwapConfirmationScene = (props: Props) => { dispatch( logEvent('Exchange_Shift_Success', { conversionValues: { - conversionType: 'crypto', - cryptoAmount: new CryptoAmount({ + conversionType: 'swap', + destAmount: new CryptoAmount({ nativeAmount: toNativeAmount, tokenId: toTokenId, currencyConfig: toWallet.currencyConfig }), + sourceAmount: new CryptoAmount({ + nativeAmount: fromNativeAmount, + tokenId: fromTokenId, + currencyConfig: fromWallet.currencyConfig + }), + isBuiltInAsset: + (toTokenId == null || toWallet.currencyConfig.builtinTokens[toTokenId] != null) && + (fromTokenId == null || fromWallet.currencyConfig.builtinTokens[fromTokenId] != null), orderId: result.orderId, swapProviderId: pluginId } diff --git a/src/util/tracking.ts b/src/util/tracking.ts index 8c98b689b8b..5e0ed959648 100644 --- a/src/util/tracking.ts +++ b/src/util/tracking.ts @@ -80,6 +80,20 @@ export interface CryptoConversionValues { orderId?: string } +/** + * Analytics: Swap + */ +export interface SwapConversionValues { + conversionType: 'swap' + isBuiltInAsset: boolean + + destAmount: CryptoAmount + sourceAmount: CryptoAmount + + swapProviderId?: string + orderId?: string +} + /** * Analytics: Sell to fiat */ @@ -125,7 +139,7 @@ export interface TrackingValues extends LoginTrackingValues { surveyResponse?: string // User's answer to a survey // Conversion values - conversionValues?: DollarConversionValues | CryptoConversionValues | SellConversionValues | BuyConversionValues + conversionValues?: DollarConversionValues | CryptoConversionValues | SellConversionValues | BuyConversionValues | SwapConversionValues } // Set up the global Posthog analytics instance at boot @@ -255,6 +269,21 @@ export function logEvent(event: TrackingEventName, values: TrackingValues = {}): params.dollarValue = Math.abs(Number(cryptoAmount.displayDollarValue(exchangeRates))) + if (orderId != null) params.orderId = orderId + if (swapProviderId != null) params.swapProviderId = swapProviderId + } else if (conversionType === 'swap') { + const { destAmount, sourceAmount, swapProviderId, orderId, isBuiltInAsset } = conversionValues + + params.isBuiltInAsset = isBuiltInAsset + + params.sourceCryptoAmount = Math.abs(Number(sourceAmount.exchangeAmount)) + params.sourceCurrencyCode = sourceAmount.currencyCode + params.sourceDollarValue = Math.abs(Number(sourceAmount.displayDollarValue(exchangeRates))) + + params.destCryptoAmount = Math.abs(Number(destAmount.exchangeAmount)) + params.destCurrencyCode = destAmount.currencyCode + params.destDollarValue = Math.abs(Number(destAmount.displayDollarValue(exchangeRates))) + if (orderId != null) params.orderId = orderId if (swapProviderId != null) params.swapProviderId = swapProviderId } From bedcbe1204f2d12d229ad619427886340e5fd6a6 Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Mon, 18 Nov 2024 16:00:39 -0800 Subject: [PATCH 18/67] Fix receive flip input to default to fiat entry --- src/__tests__/scenes/__snapshots__/RequestScene.test.tsx.snap | 2 +- src/components/scenes/RequestScene.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/__tests__/scenes/__snapshots__/RequestScene.test.tsx.snap b/src/__tests__/scenes/__snapshots__/RequestScene.test.tsx.snap index 9a4c38e671c..68f2fcef740 100644 --- a/src/__tests__/scenes/__snapshots__/RequestScene.test.tsx.snap +++ b/src/__tests__/scenes/__snapshots__/RequestScene.test.tsx.snap @@ -191,7 +191,7 @@ exports[`Request should render with loaded props 1`] = ` marginRem={0} > Date: Mon, 18 Nov 2024 16:28:41 -0800 Subject: [PATCH 19/67] Fix default home/assets screen logic Got broken in the navigation upgrade --- src/actions/LoginActions.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/actions/LoginActions.tsx b/src/actions/LoginActions.tsx index a75b475e12e..9488b05aa64 100644 --- a/src/actions/LoginActions.tsx +++ b/src/actions/LoginActions.tsx @@ -120,11 +120,12 @@ export function initializeAccount(navigation: NavigationBase, account: EdgeAccou performance.mark('loginEnd', { detail: { isNewAccount: newAccount } }) } else { + const { defaultScreen } = getDeviceSettings() rootNavigation.replace('edgeApp', { screen: 'edgeAppStack', params: { screen: 'edgeTabs', - params: { screen: 'home' } + params: defaultScreen === 'home' ? { screen: 'home' } : { screen: 'walletsTab', params: { screen: 'walletList' } } } }) referralPromise.catch(() => console.log(`Failed to load account referral info`)) From 7ed490ba78443083fc145e455c33398e789ece03 Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Fri, 22 Nov 2024 14:23:09 -0800 Subject: [PATCH 20/67] Remove autofocus from `WalletListModal` --- .../modals/__snapshots__/WalletListModal.test.tsx.snap | 2 +- src/components/modals/WalletListModal.tsx | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/__tests__/modals/__snapshots__/WalletListModal.test.tsx.snap b/src/__tests__/modals/__snapshots__/WalletListModal.test.tsx.snap index 486a9a9424f..807061b8050 100644 --- a/src/__tests__/modals/__snapshots__/WalletListModal.test.tsx.snap +++ b/src/__tests__/modals/__snapshots__/WalletListModal.test.tsx.snap @@ -353,7 +353,7 @@ exports[`WalletListModal should render with loading props 1`] = ` } } accessible={true} - autoFocus={true} + autoFocus={false} disableAnimation={ { "value": 0, diff --git a/src/components/modals/WalletListModal.tsx b/src/components/modals/WalletListModal.tsx index 1f9b96f7add..8d7e0663594 100644 --- a/src/components/modals/WalletListModal.tsx +++ b/src/components/modals/WalletListModal.tsx @@ -213,7 +213,6 @@ export function WalletListModal(props: Props) { {headerTitle} Date: Tue, 19 Nov 2024 16:55:41 -0800 Subject: [PATCH 21/67] Add "Add Wallet" button to `WalletListScene` --- CHANGELOG.md | 4 ++++ src/components/scenes/WalletListScene.tsx | 13 +++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2995909bf4..8a270d16d0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,11 @@ ## 4.17.2 +- added: "Add Wallet" button to bottom of `WalletListScene` - fixed: (Zcash/Pirate) Fixed android build issues +- fixed: Default home/assets scene post-login based on last visited scene +- fixed: Receive flip input default currency selection +- removed: Keyboard autofocus from `WalletListModal` ## 4.17.1 diff --git a/src/components/scenes/WalletListScene.tsx b/src/components/scenes/WalletListScene.tsx index e62ac830dc5..bcdf2da0278 100644 --- a/src/components/scenes/WalletListScene.tsx +++ b/src/components/scenes/WalletListScene.tsx @@ -86,6 +86,10 @@ export function WalletListScene(props: Props) { navigation.navigate('walletRestore') }) + const handlePressAddWallets = useHandler(() => { + navigation.navigate('createWalletSelectCrypto', {}) + }) + const tokenSupportingWalletIds = React.useMemo(() => { const walletIds: string[] = [] for (const wallet of Object.values(account.currencyWallets)) { @@ -129,8 +133,13 @@ export function WalletListScene(props: Props) { if (isSearching && tokenSupportingWalletIds.length > 0) { return } - return - }, [handlePressAddEditToken, handlePressRestoreWallets, tokenSupportingWalletIds, isSearching]) + return ( + + ) + }, [isSearching, tokenSupportingWalletIds.length, handlePressAddWallets, handlePressRestoreWallets, handlePressAddEditToken]) const renderFooter: FooterRender = React.useCallback( sceneWrapperInfo => { From 427ee2f1b4d0c7d4bcad21730fe73057e3b43614 Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Wed, 20 Nov 2024 19:45:42 -0800 Subject: [PATCH 22/67] Fix wallet selection logic Specifically for wallets created from this scene --- src/components/scenes/Staking/EarnScene.tsx | 89 ++++++++++++++++++--- 1 file changed, 78 insertions(+), 11 deletions(-) diff --git a/src/components/scenes/Staking/EarnScene.tsx b/src/components/scenes/Staking/EarnScene.tsx index 6ccf322c8e5..c230509ba0f 100644 --- a/src/components/scenes/Staking/EarnScene.tsx +++ b/src/components/scenes/Staking/EarnScene.tsx @@ -1,3 +1,4 @@ +import { useIsFocused } from '@react-navigation/native' import { EdgeCurrencyInfo, EdgeCurrencyWallet } from 'edge-core-js' import * as React from 'react' import { ActivityIndicator } from 'react-native' @@ -64,13 +65,50 @@ export const EarnScene = (props: Props) => { const wallets = Object.values(currencyWallets) const [isPortfolioSelected, setIsPortfolioSelected] = React.useState(false) - const [isLoading, setIsLoading] = React.useState(true) - - const [updateCounter, setUpdateCounter] = React.useState(0) + const [isLoadingDiscover, setIsLoadingDiscover] = React.useState(true) + const [isLoadingPortfolio, setIsLoadingPortfolio] = React.useState(true) + const [isPrevFocused, setIsPrevFocused] = React.useState(true) const handleSelectEarn = useHandler(() => setIsPortfolioSelected(false)) const handleSelectPortfolio = useHandler(() => setIsPortfolioSelected(true)) + const isFocused = useIsFocused() + + const refreshStakePositions = async (pluginId: string): Promise => { + const isStakingSupported = SPECIAL_CURRENCY_INFO[pluginId]?.isStakingSupported === true && ENV.ENABLE_STAKING + if (!isStakingSupported || STAKE_POLICY_MAP[pluginId] == null) return [] + + const matchingWallets = wallets.filter((wallet: EdgeCurrencyWallet) => wallet.currencyInfo.pluginId === pluginId) + const updatedDisplayStakeInfos = [] + for (const displayStakeInfo of STAKE_POLICY_MAP[pluginId]) { + const { stakePlugin, stakePolicy } = displayStakeInfo + + const walletStakePositions = [] + for (const wallet of matchingWallets) { + try { + // Determine if a wallet matching this policy has an open position + const stakePosition = await stakePlugin.fetchStakePosition({ stakePolicyId: stakePolicy.stakePolicyId, wallet, account }) + const allocations = getPositionAllocations(stakePosition) + const { staked, earned, unstaked } = allocations + const isPositionOpen = [...staked, ...earned, ...unstaked].some(positionAllocation => !zeroString(positionAllocation.nativeAmount)) + + walletStakePositions.push({ wallet, isPositionOpen, stakePosition }) + } catch (e) { + showDevError(e) + } + } + + // Create a new displayStakeInfo object + updatedDisplayStakeInfos.push({ + stakePlugin, + stakePolicy, + walletStakeInfos: walletStakePositions + }) + } + + return updatedDisplayStakeInfos + } + useAsyncEffect( async () => { for (const pluginId of Object.keys(currencyConfigMap)) { @@ -106,15 +144,34 @@ export const EarnScene = (props: Props) => { stakePolicy, walletStakeInfos: walletStakePositions }) - // Trigger re-render - setUpdateCounter(prevCounter => prevCounter + 1) } } } - setIsLoading(false) + setIsLoadingPortfolio(false) + setIsLoadingDiscover(false) }, - [updateCounter], - 'EarnScene' + [], + 'EarnScene Initialize STAKE_POLICY_MAP' + ) + + // Refresh stake positions when re-entering the scene + useAsyncEffect( + async () => { + if (isFocused && !isPrevFocused) { + setIsLoadingPortfolio(true) + + for (const pluginId of Object.keys(currencyConfigMap)) { + const newDisplayStakeInfos = await refreshStakePositions(pluginId) + STAKE_POLICY_MAP[pluginId] = newDisplayStakeInfos + } + + setIsLoadingPortfolio(false) + } + + setIsPrevFocused(isFocused) + }, + [isFocused], + 'EarnScene Refresh Stake Positions' ) const renderStakeItems = (displayStakeInfo: DisplayStakeInfo, currencyInfo: EdgeCurrencyInfo) => { @@ -130,10 +187,18 @@ export const EarnScene = (props: Props) => { let walletId: string | undefined let stakePosition - if (walletStakeInfos.length === 1 || (isPortfolioSelected && openStakePositions.length === 1)) { + const matchingWallets = wallets.filter((wallet: EdgeCurrencyWallet) => wallet.currencyInfo.pluginId === currencyInfo.pluginId) + if (matchingWallets.length === 1) { // Only one compatible wallet if on "Discover", or only one open // position on "Portfolio." Auto-select the wallet. - const { wallet, stakePosition: existingStakePosition } = walletStakeInfos[0] + const { wallet, stakePosition: existingStakePosition } = walletStakeInfos[0] ?? { + // It's possible that the wallet was created on this scene previously, + // and when re-navigating back here, the STAKE_POLICY_MAP has not + // finished updating. The `StakeOverviewScene` will handle refreshing + // the position, if any. + wallet: matchingWallets[0], + stakePosition: undefined + } walletId = wallet.id stakePosition = existingStakePosition @@ -190,7 +255,9 @@ export const EarnScene = (props: Props) => { {Object.keys(STAKE_POLICY_MAP).map(pluginId => STAKE_POLICY_MAP[pluginId].map(displayStakeInfo => renderStakeItems(displayStakeInfo, currencyConfigMap[pluginId].currencyInfo)) )} - {isLoading && } + {((isLoadingDiscover && !isPortfolioSelected) || (isLoadingPortfolio && isPortfolioSelected)) && ( + + )} ) } From 3a81d5eec4729652840ff1e7dadda2f44ed47e0d Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Fri, 22 Nov 2024 10:15:19 -0800 Subject: [PATCH 23/67] Filter deprecated stake policies From Discover tab only, in case they have an open stake position already. --- src/components/scenes/Staking/EarnScene.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/scenes/Staking/EarnScene.tsx b/src/components/scenes/Staking/EarnScene.tsx index c230509ba0f..85eefe6dbd0 100644 --- a/src/components/scenes/Staking/EarnScene.tsx +++ b/src/components/scenes/Staking/EarnScene.tsx @@ -121,7 +121,7 @@ export const EarnScene = (props: Props) => { const matchingWallets = wallets.filter((wallet: EdgeCurrencyWallet) => wallet.currencyInfo.pluginId === pluginId) for (const stakePlugin of stakePlugins) { - const stakePolicies = stakePlugin.getPolicies({ pluginId }) + const stakePolicies = stakePlugin.getPolicies({ pluginId }).filter(stakePolicy => !stakePolicy.deprecated) for (const stakePolicy of stakePolicies) { const walletStakePositions = [] From 2902330d7b9b8c9cde183ade959050fab0e29a53 Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Tue, 26 Nov 2024 17:49:50 -0800 Subject: [PATCH 24/67] Split data+logic for Portfolio vs Discover --- src/components/scenes/Staking/EarnScene.tsx | 292 ++++++++++++-------- 1 file changed, 176 insertions(+), 116 deletions(-) diff --git a/src/components/scenes/Staking/EarnScene.tsx b/src/components/scenes/Staking/EarnScene.tsx index 85eefe6dbd0..757857ff055 100644 --- a/src/components/scenes/Staking/EarnScene.tsx +++ b/src/components/scenes/Staking/EarnScene.tsx @@ -26,25 +26,49 @@ import { cacheStyles, Theme, useTheme } from '../../services/ThemeContext' interface Props extends EdgeAppSceneProps<'earnScene'> {} +export interface EarnSceneParams {} + let USERNAME: string | undefined -let STAKE_POLICY_MAP: StakePolicyMap = {} +let DISCOVER_MAP: DiscoverStakeMap = {} +let PORTFOLIO_MAP: PortfolioStakeMap = {} -export interface EarnSceneParams {} +interface DiscoverStakeInfo { + stakePlugin: StakePlugin + stakePolicy: StakePolicy +} + +interface PortfolioStakeInfo extends DiscoverStakeInfo { + walletStakeInfos: WalletStakeInfo[] +} + +interface DiscoverStakeMap { + [stakePolicyId: string]: DiscoverStakeInfo +} + +interface PortfolioStakeMap { + [stakePolicyId: string]: PortfolioStakeInfo +} interface WalletStakeInfo { wallet: EdgeCurrencyWallet - isPositionOpen: boolean stakePosition: StakePosition } -interface DisplayStakeInfo { - stakePlugin: StakePlugin - stakePolicy: StakePolicy - walletStakeInfos: WalletStakeInfo[] -} +/** Hook to ensure the UI updates on map changes, while retaining cached data + * functionality */ +const useStakeMaps = () => { + const [, forceUpdate] = React.useReducer(x => x + 1, 0) + + const updateMaps = React.useCallback((updates: () => void) => { + updates() + forceUpdate() + }, []) -interface StakePolicyMap { - [pluginId: string]: DisplayStakeInfo[] + return { + discoverMap: DISCOVER_MAP, + portfolioMap: PORTFOLIO_MAP, + updateMaps + } } export const EarnScene = (props: Props) => { @@ -52,174 +76,209 @@ export const EarnScene = (props: Props) => { const theme = useTheme() const styles = getStyles(theme) + const { discoverMap, portfolioMap, updateMaps } = useStakeMaps() + const account = useSelector(state => state.core.account) if (USERNAME !== account.username) { // Reset local variable if user changes USERNAME = account.username - STAKE_POLICY_MAP = {} + DISCOVER_MAP = {} + PORTFOLIO_MAP = {} } const currencyConfigMap = useSelector(state => state.core.account.currencyConfig) - const currencyWallets = useWatch(account, 'currencyWallets') const wallets = Object.values(currencyWallets) const [isPortfolioSelected, setIsPortfolioSelected] = React.useState(false) const [isLoadingDiscover, setIsLoadingDiscover] = React.useState(true) const [isLoadingPortfolio, setIsLoadingPortfolio] = React.useState(true) - const [isPrevFocused, setIsPrevFocused] = React.useState(true) + const [isPrevFocused, setIsPrevFocused] = React.useState() const handleSelectEarn = useHandler(() => setIsPortfolioSelected(false)) const handleSelectPortfolio = useHandler(() => setIsPortfolioSelected(true)) const isFocused = useIsFocused() - const refreshStakePositions = async (pluginId: string): Promise => { - const isStakingSupported = SPECIAL_CURRENCY_INFO[pluginId]?.isStakingSupported === true && ENV.ENABLE_STAKING - if (!isStakingSupported || STAKE_POLICY_MAP[pluginId] == null) return [] + useAsyncEffect( + async () => { + const pluginIds = Object.keys(currencyConfigMap) - const matchingWallets = wallets.filter((wallet: EdgeCurrencyWallet) => wallet.currencyInfo.pluginId === pluginId) - const updatedDisplayStakeInfos = [] - for (const displayStakeInfo of STAKE_POLICY_MAP[pluginId]) { - const { stakePlugin, stakePolicy } = displayStakeInfo + for (const pluginId of pluginIds) { + setIsLoadingDiscover(true) - const walletStakePositions = [] - for (const wallet of matchingWallets) { - try { - // Determine if a wallet matching this policy has an open position - const stakePosition = await stakePlugin.fetchStakePosition({ stakePolicyId: stakePolicy.stakePolicyId, wallet, account }) - const allocations = getPositionAllocations(stakePosition) - const { staked, earned, unstaked } = allocations - const isPositionOpen = [...staked, ...earned, ...unstaked].some(positionAllocation => !zeroString(positionAllocation.nativeAmount)) - - walletStakePositions.push({ wallet, isPositionOpen, stakePosition }) - } catch (e) { - showDevError(e) - } - } + const isStakingSupported = SPECIAL_CURRENCY_INFO[pluginId]?.isStakingSupported === true && ENV.ENABLE_STAKING + if (!isStakingSupported) continue - // Create a new displayStakeInfo object - updatedDisplayStakeInfos.push({ - stakePlugin, - stakePolicy, - walletStakeInfos: walletStakePositions - }) - } + const stakePlugins = await getStakePlugins(pluginId) - return updatedDisplayStakeInfos - } + updateMaps(() => { + for (const stakePlugin of stakePlugins) { + for (const stakePolicy of stakePlugin.getPolicies({ pluginId }).filter(stakePolicy => !stakePolicy.deprecated)) { + DISCOVER_MAP[stakePolicy.stakePolicyId] = { + stakePlugin, + stakePolicy + } + } + } + }) + + console.debug('getStakePlugins', pluginId, 'complete') + setIsLoadingDiscover(false) + } + + setIsLoadingDiscover(false) + return () => {} + }, + [], + 'EarnScene Initialize Discover Items' + ) + // Refresh stake positions when re-entering the scene or on initial load useAsyncEffect( async () => { - for (const pluginId of Object.keys(currencyConfigMap)) { - const isStakingSupported = SPECIAL_CURRENCY_INFO[pluginId]?.isStakingSupported === true && ENV.ENABLE_STAKING - if (STAKE_POLICY_MAP[pluginId] != null || !isStakingSupported) continue + if (!isLoadingDiscover || (isFocused && !isPrevFocused)) { + setIsLoadingPortfolio(true) - // Initialize stake policy - const stakePlugins = await getStakePlugins(pluginId) - STAKE_POLICY_MAP[pluginId] = [] + const controller = new AbortController() + const signal = controller.signal - const matchingWallets = wallets.filter((wallet: EdgeCurrencyWallet) => wallet.currencyInfo.pluginId === pluginId) - for (const stakePlugin of stakePlugins) { - const stakePolicies = stakePlugin.getPolicies({ pluginId }).filter(stakePolicy => !stakePolicy.deprecated) + try { + const stakePolicyIds = Object.keys(discoverMap) + for (const stakePolicyId of stakePolicyIds) { + if (signal.aborted) break - for (const stakePolicy of stakePolicies) { - const walletStakePositions = [] - for (const wallet of matchingWallets) { + const discoverInfo = discoverMap[stakePolicyId] + const { stakePlugin, stakePolicy } = discoverInfo + + // Find matching wallets based on the first stake asset's pluginId + const pluginId = stakePolicy.stakeAssets[0].pluginId + const matchingWallets = wallets.filter((wallet: EdgeCurrencyWallet) => wallet.currencyInfo.pluginId === pluginId) + + const walletStakeInfoPromises = matchingWallets.map(async wallet => { + if (signal.aborted) return null try { - // Determine if a wallet matching this policy has an open position - const stakePosition = await stakePlugin.fetchStakePosition({ stakePolicyId: stakePolicy.stakePolicyId, wallet, account }) + const stakePosition = await stakePlugin.fetchStakePosition({ + stakePolicyId: stakePolicy.stakePolicyId, + wallet, + account + }) const allocations = getPositionAllocations(stakePosition) const { staked, earned, unstaked } = allocations const isPositionOpen = [...staked, ...earned, ...unstaked].some(positionAllocation => !zeroString(positionAllocation.nativeAmount)) - walletStakePositions.push({ wallet, isPositionOpen, stakePosition }) + if (isPositionOpen) { + return { wallet, stakePosition } + } } catch (e) { showDevError(e) } - } - - STAKE_POLICY_MAP[pluginId].push({ - stakePlugin, - stakePolicy, - walletStakeInfos: walletStakePositions + return null }) + + if (!signal.aborted) { + const walletStakeInfos = (await Promise.all(walletStakeInfoPromises)).filter( + (info: WalletStakeInfo | null): info is WalletStakeInfo => info != null + ) + + updateMaps(() => { + PORTFOLIO_MAP[stakePolicyId] = { + ...discoverInfo, + walletStakeInfos + } + }) + } } + } finally { + if (!signal.aborted) { + setIsLoadingPortfolio(false) + setIsPrevFocused(isFocused) + } + } + + return () => { + controller.abort() } } - setIsLoadingPortfolio(false) - setIsLoadingDiscover(false) }, - [], - 'EarnScene Initialize STAKE_POLICY_MAP' + [isFocused, isLoadingDiscover, updateMaps], + 'EarnScene Refresh Portfolio Data' ) - // Refresh stake positions when re-entering the scene - useAsyncEffect( - async () => { - if (isFocused && !isPrevFocused) { - setIsLoadingPortfolio(true) + const renderDiscoverItem = (discoverStakeInfo: DiscoverStakeInfo, currencyInfo: EdgeCurrencyInfo) => { + const { stakePlugin, stakePolicy } = discoverStakeInfo - for (const pluginId of Object.keys(currencyConfigMap)) { - const newDisplayStakeInfos = await refreshStakePositions(pluginId) - STAKE_POLICY_MAP[pluginId] = newDisplayStakeInfos - } + const handlePress = async () => { + let walletId: string | undefined - setIsLoadingPortfolio(false) - } + const matchingWallets = wallets.filter((wallet: EdgeCurrencyWallet) => wallet.currencyInfo.pluginId === currencyInfo.pluginId) + if (matchingWallets.length === 1) { + // Only one compatible wallet, auto-select it + const wallet = matchingWallets[0] + walletId = wallet.id + } else { + // Select an existing wallet that matches this policy or create a new one + const allowedAssets = stakePolicy.stakeAssets.map(stakeAsset => ({ pluginId: stakeAsset.pluginId, tokenId: null })) - setIsPrevFocused(isFocused) - }, - [isFocused], - 'EarnScene Refresh Stake Positions' - ) + const result = await Airship.show(bridge => ( + + )) - const renderStakeItems = (displayStakeInfo: DisplayStakeInfo, currencyInfo: EdgeCurrencyInfo) => { - const { stakePlugin, stakePolicy, walletStakeInfos } = displayStakeInfo + if (result?.type === 'wallet') { + walletId = result.walletId + } + } - const openStakePositions = walletStakeInfos.filter(walletStakeInfo => walletStakeInfo.isPositionOpen) + // User backed out of the WalletListModal + if (walletId == null) return - if (isPortfolioSelected && openStakePositions.length === 0) { - return null + navigation.push('stakeOverview', { + walletId, + stakePlugin, + stakePolicy, + // 'stakeOverview' scene will fetch the position if one exists. + // No need to know if a position exists at this point. + stakePosition: undefined + }) } + return ( + + + + ) + } + + const renderPortfolioItem = (portfolioStakeInfo: PortfolioStakeInfo, currencyInfo: EdgeCurrencyInfo) => { + const { stakePlugin, stakePolicy, walletStakeInfos } = portfolioStakeInfo + if (walletStakeInfos.length === 0) return null + const handlePress = async () => { let walletId: string | undefined let stakePosition const matchingWallets = wallets.filter((wallet: EdgeCurrencyWallet) => wallet.currencyInfo.pluginId === currencyInfo.pluginId) if (matchingWallets.length === 1) { - // Only one compatible wallet if on "Discover", or only one open - // position on "Portfolio." Auto-select the wallet. - const { wallet, stakePosition: existingStakePosition } = walletStakeInfos[0] ?? { - // It's possible that the wallet was created on this scene previously, - // and when re-navigating back here, the STAKE_POLICY_MAP has not - // finished updating. The `StakeOverviewScene` will handle refreshing - // the position, if any. - wallet: matchingWallets[0], - stakePosition: undefined - } - + // Only one wallet with an open position, auto-select it + const { wallet, stakePosition: existingStakePosition } = walletStakeInfos[0] walletId = wallet.id stakePosition = existingStakePosition } else { - // Select an existing wallet that matches this policy or create a new one - const allowedAssets = stakePolicy.stakeAssets.map(stakeAsset => ({ pluginId: stakeAsset.pluginId, tokenId: null })) - - // Filter for wallets that have an open position if "Portfolio" is - // selected - const allowedPortfolioWalletIds = isPortfolioSelected - ? walletStakeInfos.filter(walletStakeInfo => walletStakeInfo.isPositionOpen).map(walletStakePosition => walletStakePosition.wallet.id) - : undefined + // Select from wallets that have an open position + const allowedWalletIds = walletStakeInfos.map(walletStakePosition => walletStakePosition.wallet.id) const result = await Airship.show(bridge => ( )) @@ -243,7 +302,7 @@ export const EarnScene = (props: Props) => { return ( - + ) } @@ -252,9 +311,10 @@ export const EarnScene = (props: Props) => { - {Object.keys(STAKE_POLICY_MAP).map(pluginId => - STAKE_POLICY_MAP[pluginId].map(displayStakeInfo => renderStakeItems(displayStakeInfo, currencyConfigMap[pluginId].currencyInfo)) - )} + {isPortfolioSelected && + Object.values(portfolioMap).map(info => renderPortfolioItem(info, currencyConfigMap[info.stakePolicy.stakeAssets[0].pluginId].currencyInfo))} + {!isPortfolioSelected && + Object.values(discoverMap).map(info => renderDiscoverItem(info, currencyConfigMap[info.stakePolicy.stakeAssets[0].pluginId].currencyInfo))} {((isLoadingDiscover && !isPortfolioSelected) || (isLoadingPortfolio && isPortfolioSelected)) && ( )} From 877093cac94ba2dadc5151a9a0f1d8c4f2d69765 Mon Sep 17 00:00:00 2001 From: Sam Holmes Date: Mon, 18 Nov 2024 13:56:38 -0800 Subject: [PATCH 25/67] Sort buyPluginList and sellPluginList JSON files --- src/constants/plugins/buyPluginList.json | 120 ++++++------- src/constants/plugins/sellPluginList.json | 204 +++++++++++----------- 2 files changed, 162 insertions(+), 162 deletions(-) diff --git a/src/constants/plugins/buyPluginList.json b/src/constants/plugins/buyPluginList.json index ed531b92ffe..50bb02f4a6e 100644 --- a/src/constants/plugins/buyPluginList.json +++ b/src/constants/plugins/buyPluginList.json @@ -1,4 +1,20 @@ [ + { + "id": "bitsofgold", + "pluginId": "bitsofgold", + "paymentTypes": ["bank"], + "title": "Israeli Bank Transfer", + "description": "Fee: 5.95%\nSettlement: 1 - 48 hours", + "partnerIconPath": "bits-of-gold-logo-sm.png", + "forCountries": ["IL"], + "cryptoCodes": ["BTC", "ETH"], + "paymentTypeLogoKey": "bank", + "deepPath": "/order/buy", + "deepQuery": { + "order_id": "null", + "page": "0" + } + }, { "id": "creditcard", "pluginId": "creditcard", @@ -58,44 +74,6 @@ "cryptoCodes": [], "paymentTypeLogoKey": "bank" }, - { - "id": "wire", - "pluginId": "wire", - "paymentType": "wire", - "paymentTypes": ["wire"], - "title": "Bank Wire Transfer", - "description": "Fee: ~2%\nSettlement: ~5 minutes\nLimit $10000", - "forCountries": ["US"], - "notStateProvinces": { "US": ["AK", "AR", "CT", "NC", "NY", "TX", "FL"] }, - "cryptoCodes": [], - "paymentTypeLogoKey": "bank" - }, - { - "id": "sepa", - "pluginId": "sepa", - "forCountries": [ - "AT", "BE", "BG", "CH", "CZ", "DE", "DK", "EE", "ES", "FI", - "FR", "GB", "GR", "HR", "HU", "IE", "IT", "LI", "LT", "LU", - "LV", "NL", "NO", "PL", "PT", "RO", "SE", "SI", "SK", "SM" - ], - "paymentType": "sepa", - "paymentTypes": ["sepa"], - "description": "Fee: 1.55%\nSettlement: 1 - 2 days", - "title": "SEPA Bank Transfer", - "paymentTypeLogoKey": "bank" - }, - { - "id": "libertyx", - "pluginId": "libertyx", - "paymentTypes": ["cash", "credit"], - "description": "Fee: 3-8%\nSettlement: Instant", - "title": "In-person Cash and Debit Card", - "partnerIconPath": "libertyXlogo.png", - "forCountries": ["US"], - "cryptoCodes": ["BTC"], - "paymentTypeLogoKey": "cash", - "deepPath": "/" - }, { "id": "ideal", "pluginId": "ideal", @@ -118,6 +96,18 @@ "cryptoCodes": [], "paymentTypeLogoKey": "interac" }, + { + "id": "libertyx", + "pluginId": "libertyx", + "paymentTypes": ["cash", "credit"], + "description": "Fee: 3-8%\nSettlement: Instant", + "title": "In-person Cash and Debit Card", + "partnerIconPath": "libertyXlogo.png", + "forCountries": ["US"], + "cryptoCodes": ["BTC"], + "paymentTypeLogoKey": "cash", + "deepPath": "/" + }, { "id": "payid", "pluginId": "payid", @@ -187,14 +177,17 @@ "paymentTypeLogoKey": "revolut" }, { - "id": "turkishbank", - "pluginId": "turkishbank", - "paymentType": "turkishbank", - "paymentTypes": ["turkishbank"], - "title": "Turkish Bank Transfer", - "description": "Fee: 8-9%\nSettlement: Instant - 1 hour", - "forCountries": [], - "cryptoCodes": [], + "id": "sepa", + "pluginId": "sepa", + "forCountries": [ + "AT", "BE", "BG", "CH", "CZ", "DE", "DK", "EE", "ES", "FI", + "FR", "GB", "GR", "HR", "HU", "IE", "IT", "LI", "LT", "LU", + "LV", "NL", "NO", "PL", "PT", "RO", "SE", "SI", "SK", "SM" + ], + "paymentType": "sepa", + "paymentTypes": ["sepa"], + "description": "Fee: 1.55%\nSettlement: 1 - 2 days", + "title": "SEPA Bank Transfer", "paymentTypeLogoKey": "bank" }, { @@ -209,20 +202,27 @@ "paymentTypeLogoKey": "bank" }, { - "id": "bitsofgold", - "pluginId": "bitsofgold", - "paymentTypes": ["bank"], - "title": "Israeli Bank Transfer", - "description": "Fee: 5.95%\nSettlement: 1 - 48 hours", - "partnerIconPath": "bits-of-gold-logo-sm.png", - "forCountries": ["IL"], - "cryptoCodes": ["BTC", "ETH"], - "paymentTypeLogoKey": "bank", - "deepPath": "/order/buy", - "deepQuery": { - "order_id": "null", - "page": "0" - } + "id": "turkishbank", + "pluginId": "turkishbank", + "paymentType": "turkishbank", + "paymentTypes": ["turkishbank"], + "title": "Turkish Bank Transfer", + "description": "Fee: 8-9%\nSettlement: Instant - 1 hour", + "forCountries": [], + "cryptoCodes": [], + "paymentTypeLogoKey": "bank" + }, + { + "id": "wire", + "pluginId": "wire", + "paymentType": "wire", + "paymentTypes": ["wire"], + "title": "Bank Wire Transfer", + "description": "Fee: ~2%\nSettlement: ~5 minutes\nLimit $10000", + "forCountries": ["US"], + "notStateProvinces": { "US": ["AK", "AR", "CT", "NC", "NY", "TX", "FL"] }, + "cryptoCodes": [], + "paymentTypeLogoKey": "bank" }, { "id": "xanpool", diff --git a/src/constants/plugins/sellPluginList.json b/src/constants/plugins/sellPluginList.json index 94aa43aa1d6..19c144aa807 100644 --- a/src/constants/plugins/sellPluginList.json +++ b/src/constants/plugins/sellPluginList.json @@ -18,16 +18,88 @@ "paymentTypeLogoKey": "bank" }, { - "id": "directtobank", - "pluginId": "directtobank", - "paymentType": "directtobank", + "id": "bitsofgold", + "pluginId": "bitsofgold", "paymentTypes": [ - "directtobank" + "bank" ], - "title": "Bank Transfer", - "description": "Fee: 1.5%\nSettlement: 5 min - 24 hours", + "title": "Israeli Bank Transfer", + "description": "Fee: 6.95% / Settlement: 1 - 48 hours\nLevel 1 Limit: €10000/day\nLevel 2 Limit: Unlimited", + "partnerIconPath": "bits-of-gold-logo-sm.png", "forCountries": [ - "AU" + "IL" + ], + "cryptoCodes": [ + "BTC", + "ETH" + ], + "paymentTypeLogoKey": "bank", + "deepPath": "/order/sell", + "deepQuery": { + "order_id": "null", + "page": "0", + "utm_source": "Edge", + "utm_medium": "mobile_app", + "utm_campaign": "co", + "etag": "true" + } + }, + { + "id": "bitrefill", + "pluginId": "bitrefill", + "paymentTypes": [ + "giftcard" + ], + "description": "Buy gift cards and reload phones with crypto", + "title": "Gift Cards", + "partnerIconPath": "bitrefill-2.png", + "forCountries": [ + "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", + "AS", "AT", "AU", "AW", "AZ", "BA", "BB", "BD", "BE", "BF", + "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", + "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", + "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", + "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", + "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", + "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", + "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", + "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", + "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", + "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", + "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", + "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", + "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", + "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", + "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", + "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", + "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", + "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", + "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", + "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", + "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", + "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", + "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW" + ], + "cryptoCodes": [ + "BTC", + "DASH", + "DOGE", + "ETH", + "LTC" + ], + "paymentTypeLogoKey": "giftcard" + }, + { + "id": "colombiabank", + "pluginId": "colombiabank", + "paymentType": "colombiabank", + "paymentTypes": [ + "colombiabank" + ], + "title": "Colombia Bank Transfer ", + "description": "Fee: ~7%\nSettlement: 5 min - 24 hours", + "forCountries": [ + "CO" ], "cryptoCodes": [], "paymentTypeLogoKey": "bank" @@ -52,16 +124,16 @@ "paymentTypeLogoKey": "bank" }, { - "id": "colombiabank", - "pluginId": "colombiabank", - "paymentType": "colombiabank", + "id": "directtobank", + "pluginId": "directtobank", + "paymentType": "directtobank", "paymentTypes": [ - "colombiabank" + "directtobank" ], - "title": "Colombia Bank Transfer ", - "description": "Fee: ~7%\nSettlement: 5 min - 24 hours", + "title": "Bank Transfer", + "description": "Fee: 1.5%\nSettlement: 5 min - 24 hours", "forCountries": [ - "CO" + "AU" ], "cryptoCodes": [], "paymentTypeLogoKey": "bank" @@ -143,76 +215,23 @@ "paymentTypeLogoKey": "pix" }, { - "id": "bitsofgold", - "pluginId": "bitsofgold", - "paymentTypes": [ - "bank" - ], - "title": "Israeli Bank Transfer", - "description": "Fee: 6.95% / Settlement: 1 - 48 hours\nLevel 1 Limit: €10000/day\nLevel 2 Limit: Unlimited", - "partnerIconPath": "bits-of-gold-logo-sm.png", - "forCountries": [ - "IL" - ], - "cryptoCodes": [ - "BTC", - "ETH" - ], - "paymentTypeLogoKey": "bank", - "deepPath": "/order/sell", - "deepQuery": { - "order_id": "null", - "page": "0", - "utm_source": "Edge", - "utm_medium": "mobile_app", - "utm_campaign": "co", - "etag": "true" - } - }, - { - "id": "bitrefill", - "pluginId": "bitrefill", - "paymentTypes": [ - "giftcard" - ], - "description": "Buy gift cards and reload phones with crypto", - "title": "Gift Cards", - "partnerIconPath": "bitrefill-2.png", - "forCountries": [ - "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", - "AS", "AT", "AU", "AW", "AZ", "BA", "BB", "BD", "BE", "BF", - "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", - "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", - "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", - "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", - "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", - "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", - "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", - "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", - "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", - "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", - "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", - "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", - "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", - "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", - "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", - "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", - "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", - "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", - "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", - "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", - "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", - "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", - "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW" - ], - "cryptoCodes": [ - "BTC", - "DASH", - "DOGE", - "ETH", - "LTC" + "##": "Disabled for now", + "id": "revolut", + "pluginId": "revolut", + "paymentType": "revolut", + "paymentTypes": ["revolut"], + "title": "Revolut", + "description": "Fee: ~5%\nSettlement: 5 min - 24 hours", + "forCountries": [], + "-forCountries": [ + "AU", "BR", "AT", "BE", "BG", "CY", "CZ", "DE", "DK", "EE", "ES", "FI", + "FR", "GR", "HR", "HU", "IE", "IS", "IT", "LI", "LT", "LU", "LV", + "MT", "NL", "NO", "PL", "PT", "RO", "SE", "SI", "SK", "JP", "NZ", + "SG", "CH", "GB", "US", "IO", "IM", "JE", "GG", "GF", "GP", "YT", + "MQ", "RE", "MF" ], - "paymentTypeLogoKey": "giftcard" + "cryptoCodes": [], + "paymentTypeLogoKey": "revolut" }, { "id": "sepa", @@ -236,25 +255,6 @@ "type": "sell" } }, - { - "##": "Disabled for now", - "id": "revolut", - "pluginId": "revolut", - "paymentType": "revolut", - "paymentTypes": ["revolut"], - "title": "Revolut", - "description": "Fee: ~5%\nSettlement: 5 min - 24 hours", - "forCountries": [], - "-forCountries": [ - "AU", "BR", "AT", "BE", "BG", "CY", "CZ", "DE", "DK", "EE", "ES", "FI", - "FR", "GR", "HR", "HU", "IE", "IS", "IT", "LI", "LT", "LU", "LV", - "MT", "NL", "NO", "PL", "PT", "RO", "SE", "SI", "SK", "JP", "NZ", - "SG", "CH", "GB", "US", "IO", "IM", "JE", "GG", "GF", "GP", "YT", - "MQ", "RE", "MF" - ], - "cryptoCodes": [], - "paymentTypeLogoKey": "revolut" - }, { "id": "xanpool", "pluginId": "xanpool", From 5a0576f36c22571ec2854b89389ecb59a714d3f6 Mon Sep 17 00:00:00 2001 From: Sam Holmes Date: Tue, 19 Nov 2024 10:56:00 -0800 Subject: [PATCH 26/67] Add Venmo GUI Plugin for buy and sell --- CHANGELOG.md | 1 + .../__snapshots__/GuiPlugins.test.ts.snap | 28 +++++++++++++++++++ src/components/scenes/GuiPluginListScene.tsx | 1 + src/constants/plugins/GuiPlugins.ts | 8 ++++++ src/constants/plugins/buyPluginList.json | 15 ++++++++++ src/constants/plugins/sellPluginList.json | 15 ++++++++++ src/plugins/gui/fiatPluginTypes.ts | 1 + src/plugins/gui/providers/moonpayProvider.ts | 17 +++++++---- 8 files changed, 81 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a270d16d0d..7b47e10b32c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - added: Support for LLD & LLM transaction history - added: Close button (X) for `EdgeModals,` specifically if a desktop platform is detected. +- added: Venmo GUI plugin via Moonpay. - changed: Auto-enable required tokens when navigating to `Stake*` scenes - fixed: Incorrect `SwapInput` amounts on `SwapCreateScene` after changing wallet. - fixed: Backing up a light account while on the `FiatPluginEnterAmountScene` retains light account-related quote errors diff --git a/src/__tests__/__snapshots__/GuiPlugins.test.ts.snap b/src/__tests__/__snapshots__/GuiPlugins.test.ts.snap index e0d14f1a264..c81a2ae1e6c 100644 --- a/src/__tests__/__snapshots__/GuiPlugins.test.ts.snap +++ b/src/__tests__/__snapshots__/GuiPlugins.test.ts.snap @@ -209,6 +209,20 @@ Settlement: 5 min - 24 hours", "pluginId": "paypal", "title": "Paypal", }, + { + "cryptoCodes": [], + "deepPath": "", + "deepQuery": {}, + "description": "Fee: ~5% +Settlement: 5 min - 24 hours", + "paymentType": "venmo", + "paymentTypeLogoKey": "venmo", + "paymentTypes": [ + "venmo", + ], + "pluginId": "venmo", + "title": "Venmo", + }, { "cryptoCodes": [], "customTitleKey": "applepay", @@ -317,6 +331,20 @@ Settlement: 5 min - 24 hours", "pluginId": "paypal", "title": "Paypal", }, + { + "cryptoCodes": [], + "deepPath": "", + "deepQuery": {}, + "description": "Fee: ~5% +Settlement: 5 min - 24 hours", + "paymentType": "venmo", + "paymentTypeLogoKey": "venmo", + "paymentTypes": [ + "venmo", + ], + "pluginId": "venmo", + "title": "Venmo", + }, { "cryptoCodes": [], "deepPath": "", diff --git a/src/components/scenes/GuiPluginListScene.tsx b/src/components/scenes/GuiPluginListScene.tsx index a187cb0ebcb..67e308d3fc6 100644 --- a/src/components/scenes/GuiPluginListScene.tsx +++ b/src/components/scenes/GuiPluginListScene.tsx @@ -88,6 +88,7 @@ const paymentTypeLogosById = { revolut: 'paymentTypeLogoRevolut', sofort: 'paymentTypeLogoSofort', upi: 'paymentTypeLogoUpi', + venmo: 'paymentTypeVenmo', visa: 'paymentTypeVisa' } const pluginPartnerLogos: { [key: string]: 'guiPluginLogoMoonpay' } = { diff --git a/src/constants/plugins/GuiPlugins.ts b/src/constants/plugins/GuiPlugins.ts index fcd0341b9f1..9880c27a39c 100644 --- a/src/constants/plugins/GuiPlugins.ts +++ b/src/constants/plugins/GuiPlugins.ts @@ -232,6 +232,14 @@ export const guiPlugins: { [pluginId: string]: GuiPlugin } = { lockUriPath: true, displayName: 'Bitrefill' }, + venmo: { + pluginId: 'amountquote', + storeId: '', + baseUri: '', + lockUriPath: true, + nativePlugin: amountQuoteFiatPlugin, + displayName: '' + }, wire: { pluginId: 'amountquote', storeId: '', diff --git a/src/constants/plugins/buyPluginList.json b/src/constants/plugins/buyPluginList.json index 50bb02f4a6e..2e60986f5c1 100644 --- a/src/constants/plugins/buyPluginList.json +++ b/src/constants/plugins/buyPluginList.json @@ -212,6 +212,17 @@ "cryptoCodes": [], "paymentTypeLogoKey": "bank" }, + { + "id": "venmo", + "pluginId": "venmo", + "paymentType": "venmo", + "paymentTypes": ["venmo"], + "title": "Venmo", + "description": "Fee: ~5%\nSettlement: 5 min - 24 hours", + "forCountries": ["US"], + "cryptoCodes": [], + "paymentTypeLogoKey": "venmo" + }, { "id": "wire", "pluginId": "wire", @@ -307,6 +318,10 @@ "id": "libertyx", "sortIndex": 50 }, + { + "id": "venmo", + "sortIndex": 15 + }, { "id": "wire", "sortIndex": 40 diff --git a/src/constants/plugins/sellPluginList.json b/src/constants/plugins/sellPluginList.json index 19c144aa807..ff8636f8a0e 100644 --- a/src/constants/plugins/sellPluginList.json +++ b/src/constants/plugins/sellPluginList.json @@ -255,6 +255,17 @@ "type": "sell" } }, + { + "id": "venmo", + "pluginId": "venmo", + "paymentType": "venmo", + "paymentTypes": ["venmo"], + "title": "Venmo", + "description": "Fee: ~5%\nSettlement: 5 min - 24 hours", + "forCountries": ["US"], + "cryptoCodes": [], + "paymentTypeLogoKey": "venmo" + }, { "id": "xanpool", "pluginId": "xanpool", @@ -320,6 +331,10 @@ "id": "bitrefill", "sortIndex": 70 }, + { + "id": "venmo", + "sortIndex": 15 + }, "----- iOS specifics -----", "----- Country Specifics -----" ] diff --git a/src/plugins/gui/fiatPluginTypes.ts b/src/plugins/gui/fiatPluginTypes.ts index d6ab44a1832..7fef375fe45 100644 --- a/src/plugins/gui/fiatPluginTypes.ts +++ b/src/plugins/gui/fiatPluginTypes.ts @@ -45,6 +45,7 @@ export const asFiatPaymentType = asValue( 'sepa', 'spei', 'turkishbank', + 'venmo', 'wire' ) export type FiatPaymentType = ReturnType diff --git a/src/plugins/gui/providers/moonpayProvider.ts b/src/plugins/gui/providers/moonpayProvider.ts index dc1084f9a25..1f754f099b4 100644 --- a/src/plugins/gui/providers/moonpayProvider.ts +++ b/src/plugins/gui/providers/moonpayProvider.ts @@ -31,10 +31,15 @@ const pluginDisplayName = 'Moonpay' const supportEmail = 'support@moonpay.com' const allowedCurrencyCodes: Record = { - buy: { credit: { providerId, fiat: {}, crypto: {} }, paypal: { providerId, fiat: {}, crypto: {} } }, + buy: { + credit: { providerId, fiat: {}, crypto: {} }, + paypal: { providerId, fiat: {}, crypto: {} }, + venmo: { providerId, fiat: {}, crypto: {} } + }, sell: { credit: { providerId, fiat: {}, crypto: {}, requiredAmountType: 'crypto' }, - paypal: { providerId, fiat: {}, crypto: {}, requiredAmountType: 'crypto' } + paypal: { providerId, fiat: {}, crypto: {}, requiredAmountType: 'crypto' }, + venmo: { providerId, fiat: {}, crypto: {}, requiredAmountType: 'crypto' } } } const allowedCountryCodes: Record = { buy: {}, sell: {} } @@ -108,7 +113,7 @@ const asApiKeys = asString const asMoonpayCountries = asArray(asMoonpayCountry) -type MoonpayPaymentMethod = 'ach_bank_transfer' | 'credit_debit_card' | 'paypal' +type MoonpayPaymentMethod = 'ach_bank_transfer' | 'credit_debit_card' | 'paypal' | 'venmo' interface MoonpayWidgetQueryParams { apiKey: string @@ -154,7 +159,8 @@ const MOONPAY_PAYMENT_TYPE_MAP: Partial Date: Mon, 2 Dec 2024 12:02:48 -0800 Subject: [PATCH 27/67] Add Buy_Success conversion tracking for Banxa --- src/locales/en_US.ts | 4 +- src/locales/strings/de.json | 2 +- src/locales/strings/enUS.json | 4 +- src/locales/strings/es.json | 2 +- src/locales/strings/fr.json | 2 +- src/locales/strings/ja.json | 2 +- src/locales/strings/kaa.json | 2 +- src/locales/strings/ko.json | 2 +- src/locales/strings/pt.json | 2 +- src/locales/strings/ru.json | 2 +- src/locales/strings/vi.json | 2 +- src/locales/strings/zh.json | 2 +- src/plugins/gui/providers/banxaProvider.ts | 54 ++++++++++++++++++++-- 13 files changed, 66 insertions(+), 16 deletions(-) diff --git a/src/locales/en_US.ts b/src/locales/en_US.ts index 55653cf1ea5..d09954e4a3b 100644 --- a/src/locales/en_US.ts +++ b/src/locales/en_US.ts @@ -735,7 +735,7 @@ const strings = { transaction_details_fee_warning: 'High Network Fees', transaction_details_swap: 'Swap Funds', transaction_details_swap_network_fee: 'Swap Network Fee', - transaction_details_swap_order_cancel: 'Swap Order Canceled', + transaction_details_swap_order_cancel: 'Swap Order Cancelled', transaction_details_swap_order_post: 'Swap Order Opened', transaction_details_swap_order_fill: 'Swap Order Filled', transaction_details_claim: 'Claim Staked Funds', @@ -1464,11 +1464,13 @@ const strings = { fiat_plugin_fetching_assets: 'Fetching supported assets', fiat_plugin_sell_cancelled: 'Sell order cancelled', fiat_plugin_finalizing_quote: 'Finalizing your exchange quote. Please wait as this may take up to a minute', + fiat_plugin_buy_cancelled: 'Buy order cancelled', fiat_plugin_buy_complete_title: 'Buy Order Complete', fiat_plugin_buy_complete_message_s: 'Your buy order of %1$s %2$s with %3$s %4$s has been completed.', fiat_plugin_buy_complete_message_2_hour_s: 'Please allow up to %1$s hour for the funds to appear in your wallet.', fiat_plugin_buy_complete_message_2_hours_s: 'Please allow up to %1$s hours for the funds to appear in your wallet.', fiat_plugin_buy_failed_try_again: 'Buy order failed. Please try again', + fiat_plugin_buy_unknown_status: 'Unknown order status upon completion. Please contact support for assistence.', fiat_plugin_sell_complete_title: 'Sell Order Complete', fiat_plugin_sell_complete_message_s: 'Your sell order of %1$s %2$s for %3$s %4$s has been completed.', fiat_plugin_sell_complete_message_2_hour_s: 'Please allow up to %1$s hour for the funds to appear in your account.', diff --git a/src/locales/strings/de.json b/src/locales/strings/de.json index 9aea04273fd..19444fb4635 100644 --- a/src/locales/strings/de.json +++ b/src/locales/strings/de.json @@ -668,7 +668,7 @@ "transaction_details_fee_warning": "Hohe Netzwerkgebühren", "transaction_details_swap": "Swap Funds", "transaction_details_swap_network_fee": "Swap Network Fee", - "transaction_details_swap_order_cancel": "Swap Order Canceled", + "transaction_details_swap_order_cancel": "Swap Order Cancelled", "transaction_details_swap_order_post": "Swap Order Opened", "transaction_details_swap_order_fill": "Swap Order Filled", "transaction_details_claim": "Claim Staked Funds", diff --git a/src/locales/strings/enUS.json b/src/locales/strings/enUS.json index 28f5c7f5600..068ee02352f 100644 --- a/src/locales/strings/enUS.json +++ b/src/locales/strings/enUS.json @@ -668,7 +668,7 @@ "transaction_details_fee_warning": "High Network Fees", "transaction_details_swap": "Swap Funds", "transaction_details_swap_network_fee": "Swap Network Fee", - "transaction_details_swap_order_cancel": "Swap Order Canceled", + "transaction_details_swap_order_cancel": "Swap Order Cancelled", "transaction_details_swap_order_post": "Swap Order Opened", "transaction_details_swap_order_fill": "Swap Order Filled", "transaction_details_claim": "Claim Staked Funds", @@ -1295,11 +1295,13 @@ "fiat_plugin_fetching_assets": "Fetching supported assets", "fiat_plugin_sell_cancelled": "Sell order cancelled", "fiat_plugin_finalizing_quote": "Finalizing your exchange quote. Please wait as this may take up to a minute", + "fiat_plugin_buy_cancelled": "Buy order cancelled", "fiat_plugin_buy_complete_title": "Buy Order Complete", "fiat_plugin_buy_complete_message_s": "Your buy order of %1$s %2$s with %3$s %4$s has been completed.", "fiat_plugin_buy_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your wallet.", "fiat_plugin_buy_complete_message_2_hours_s": "Please allow up to %1$s hours for the funds to appear in your wallet.", "fiat_plugin_buy_failed_try_again": "Buy order failed. Please try again", + "fiat_plugin_buy_unknown_status": "Unknown order status upon completion. Please contact support for assistence.", "fiat_plugin_sell_complete_title": "Sell Order Complete", "fiat_plugin_sell_complete_message_s": "Your sell order of %1$s %2$s for %3$s %4$s has been completed.", "fiat_plugin_sell_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your account.", diff --git a/src/locales/strings/es.json b/src/locales/strings/es.json index ac4d9914f69..5b56716183b 100644 --- a/src/locales/strings/es.json +++ b/src/locales/strings/es.json @@ -668,7 +668,7 @@ "transaction_details_fee_warning": "Tarifas de red altas", "transaction_details_swap": "Swap Funds", "transaction_details_swap_network_fee": "Swap Network Fee", - "transaction_details_swap_order_cancel": "Swap Order Canceled", + "transaction_details_swap_order_cancel": "Swap Order Cancelled", "transaction_details_swap_order_post": "Swap Order Opened", "transaction_details_swap_order_fill": "Swap Order Filled", "transaction_details_claim": "Claim Staked Funds", diff --git a/src/locales/strings/fr.json b/src/locales/strings/fr.json index 44cede5668a..4d300de877a 100644 --- a/src/locales/strings/fr.json +++ b/src/locales/strings/fr.json @@ -668,7 +668,7 @@ "transaction_details_fee_warning": "High Network Fees", "transaction_details_swap": "Swap Funds", "transaction_details_swap_network_fee": "Swap Network Fee", - "transaction_details_swap_order_cancel": "Swap Order Canceled", + "transaction_details_swap_order_cancel": "Swap Order Cancelled", "transaction_details_swap_order_post": "Swap Order Opened", "transaction_details_swap_order_fill": "Swap Order Filled", "transaction_details_claim": "Claim Staked Funds", diff --git a/src/locales/strings/ja.json b/src/locales/strings/ja.json index 8f822ba51f0..b97d733515f 100644 --- a/src/locales/strings/ja.json +++ b/src/locales/strings/ja.json @@ -668,7 +668,7 @@ "transaction_details_fee_warning": "高いネットワーク手数料", "transaction_details_swap": "Swap Funds", "transaction_details_swap_network_fee": "Swap Network Fee", - "transaction_details_swap_order_cancel": "Swap Order Canceled", + "transaction_details_swap_order_cancel": "Swap Order Cancelled", "transaction_details_swap_order_post": "Swap Order Opened", "transaction_details_swap_order_fill": "Swap Order Filled", "transaction_details_claim": "Claim Staked Funds", diff --git a/src/locales/strings/kaa.json b/src/locales/strings/kaa.json index a5f5ad49ca8..5f25909f58d 100644 --- a/src/locales/strings/kaa.json +++ b/src/locales/strings/kaa.json @@ -668,7 +668,7 @@ "transaction_details_fee_warning": "High Network Fees", "transaction_details_swap": "Swap Funds", "transaction_details_swap_network_fee": "Swap Network Fee", - "transaction_details_swap_order_cancel": "Swap Order Canceled", + "transaction_details_swap_order_cancel": "Swap Order Cancelled", "transaction_details_swap_order_post": "Swap Order Opened", "transaction_details_swap_order_fill": "Swap Order Filled", "transaction_details_claim": "Claim Staked Funds", diff --git a/src/locales/strings/ko.json b/src/locales/strings/ko.json index a3c64058c7a..89881ddaad0 100644 --- a/src/locales/strings/ko.json +++ b/src/locales/strings/ko.json @@ -668,7 +668,7 @@ "transaction_details_fee_warning": "High Network Fees", "transaction_details_swap": "Swap Funds", "transaction_details_swap_network_fee": "Swap Network Fee", - "transaction_details_swap_order_cancel": "Swap Order Canceled", + "transaction_details_swap_order_cancel": "Swap Order Cancelled", "transaction_details_swap_order_post": "Swap Order Opened", "transaction_details_swap_order_fill": "Swap Order Filled", "transaction_details_claim": "Claim Staked Funds", diff --git a/src/locales/strings/pt.json b/src/locales/strings/pt.json index 9f251311bc5..f4ab0e9723b 100644 --- a/src/locales/strings/pt.json +++ b/src/locales/strings/pt.json @@ -668,7 +668,7 @@ "transaction_details_fee_warning": "Altas taxas de rede", "transaction_details_swap": "Swap Funds", "transaction_details_swap_network_fee": "Swap Network Fee", - "transaction_details_swap_order_cancel": "Swap Order Canceled", + "transaction_details_swap_order_cancel": "Swap Order Cancelled", "transaction_details_swap_order_post": "Swap Order Opened", "transaction_details_swap_order_fill": "Swap Order Filled", "transaction_details_claim": "Claim Staked Funds", diff --git a/src/locales/strings/ru.json b/src/locales/strings/ru.json index aea18aa58d1..08949126ccf 100644 --- a/src/locales/strings/ru.json +++ b/src/locales/strings/ru.json @@ -668,7 +668,7 @@ "transaction_details_fee_warning": "High Network Fees", "transaction_details_swap": "Swap Funds", "transaction_details_swap_network_fee": "Swap Network Fee", - "transaction_details_swap_order_cancel": "Swap Order Canceled", + "transaction_details_swap_order_cancel": "Swap Order Cancelled", "transaction_details_swap_order_post": "Swap Order Opened", "transaction_details_swap_order_fill": "Swap Order Filled", "transaction_details_claim": "Claim Staked Funds", diff --git a/src/locales/strings/vi.json b/src/locales/strings/vi.json index cca64c00791..a466601426d 100644 --- a/src/locales/strings/vi.json +++ b/src/locales/strings/vi.json @@ -668,7 +668,7 @@ "transaction_details_fee_warning": "High Network Fees", "transaction_details_swap": "Swap Funds", "transaction_details_swap_network_fee": "Swap Network Fee", - "transaction_details_swap_order_cancel": "Swap Order Canceled", + "transaction_details_swap_order_cancel": "Swap Order Cancelled", "transaction_details_swap_order_post": "Swap Order Opened", "transaction_details_swap_order_fill": "Swap Order Filled", "transaction_details_claim": "Claim Staked Funds", diff --git a/src/locales/strings/zh.json b/src/locales/strings/zh.json index 752bdddb479..4a29a0861dc 100644 --- a/src/locales/strings/zh.json +++ b/src/locales/strings/zh.json @@ -668,7 +668,7 @@ "transaction_details_fee_warning": "High Network Fees", "transaction_details_swap": "Swap Funds", "transaction_details_swap_network_fee": "Swap Network Fee", - "transaction_details_swap_order_cancel": "Swap Order Canceled", + "transaction_details_swap_order_cancel": "Swap Order Cancelled", "transaction_details_swap_order_post": "Swap Order Opened", "transaction_details_swap_order_fill": "Swap Order Filled", "transaction_details_claim": "Claim Staked Funds", diff --git a/src/plugins/gui/providers/banxaProvider.ts b/src/plugins/gui/providers/banxaProvider.ts index f7443fbf965..a7153cf3c50 100644 --- a/src/plugins/gui/providers/banxaProvider.ts +++ b/src/plugins/gui/providers/banxaProvider.ts @@ -560,9 +560,9 @@ export const banxaProvider: FiatProviderFactory = { source: queryParams.source, target: queryParams.target, blockchain: banxaChain, - return_url_on_success: RETURN_URL_SUCCESS, - return_url_on_cancelled: RETURN_URL_CANCEL, - return_url_on_failure: RETURN_URL_FAIL + return_url_on_success: direction === 'buy' ? `https://deep.edge.app/fiatprovider/buy/banxa?status=success` : RETURN_URL_SUCCESS, + return_url_on_cancelled: direction === 'buy' ? `https://deep.edge.app/fiatprovider/buy/banxa?status=cancelled` : RETURN_URL_CANCEL, + return_url_on_failure: direction === 'buy' ? `https://deep.edge.app/fiatprovider/buy/banxa?status=failure` : RETURN_URL_FAIL } if (direction === 'buy') { if (testnet && banxaChain === 'BTC') { @@ -594,7 +594,53 @@ export const banxaProvider: FiatProviderFactory = { let insideInterval = false if (direction === 'buy') { - await showUi.openExternalWebView({ url: banxaQuote.data.order.checkout_url }) + await showUi.openExternalWebView({ + providerId, + url: banxaQuote.data.order.checkout_url, + deeplinkHandler: async link => { + if (link.direction !== 'buy') return + + const orderResponse = await banxaFetch({ method: 'GET', url, hmacUser, path: `api/orders/${banxaQuote.data.order.id}`, apiKey }) + const order = asBanxaOrderResponse(orderResponse) + + switch (link.query.status) { + case 'success': { + await showUi.trackConversion('Buy_Success', { + conversionValues: { + conversionType: 'buy', + sourceFiatCurrencyCode: fiatCurrencyCode, + sourceFiatAmount: priceQuote.fiat_amount, + destAmount: new CryptoAmount({ + currencyConfig: coreWallet.currencyConfig, + currencyCode: displayCurrencyCode, + exchangeAmount: order.data.order.coin_amount + }), + fiatProviderId: providerId, + orderId: banxaQuote.data.order.id + } + }) + await showUi.exitScene() + break + } + case 'cancelled': { + console.log('Banxa WebView launch buy cancelled: ' + link.uri) + await showUi.showToast(lstrings.fiat_plugin_buy_cancelled, NOT_SUCCESS_TOAST_HIDE_MS) + await showUi.exitScene() + break + } + case 'failure': { + console.log('Banxa WebView launch buy failure: ' + link.uri) + await showUi.showToast(lstrings.fiat_plugin_buy_failed_try_again, NOT_SUCCESS_TOAST_HIDE_MS) + await showUi.exitScene() + break + } + default: { + await showUi.showToast(lstrings.fiat_plugin_buy_unknown_status, NOT_SUCCESS_TOAST_HIDE_MS) + await showUi.exitScene() + } + } + } + }) } else { const { checkout_url: checkoutUrl, id } = banxaQuote.data.order const banxaUrl = new URL(checkoutUrl) From 3f475f60b13dbb1f72b18532ac7162308a6b125d Mon Sep 17 00:00:00 2001 From: Sam Holmes Date: Thu, 21 Nov 2024 14:08:44 -0800 Subject: [PATCH 28/67] Add Buy_Success conversion tracking for Simplex --- src/plugins/gui/providers/simplexProvider.ts | 51 ++++++++++++++++++-- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/src/plugins/gui/providers/simplexProvider.ts b/src/plugins/gui/providers/simplexProvider.ts index c52b1736d4e..4bf22318593 100644 --- a/src/plugins/gui/providers/simplexProvider.ts +++ b/src/plugins/gui/providers/simplexProvider.ts @@ -2,6 +2,8 @@ import { gt, lt } from 'biggystring' import { asArray, asEither, asNumber, asObject, asString } from 'cleaners' +import { lstrings } from '../../../locales/strings' +import { CryptoAmount } from '../../../util/CryptoAmount' import { fetchInfo } from '../../../util/network' import { asFiatPaymentType, FiatPaymentType } from '../fiatPluginTypes' import { @@ -16,7 +18,7 @@ import { FiatProviderQuote } from '../fiatProviderTypes' import { addTokenToArray } from '../util/providerUtils' -import { addExactRegion, isDailyCheckDue, validateExactRegion } from './common' +import { addExactRegion, isDailyCheckDue, NOT_SUCCESS_TOAST_HIDE_MS, validateExactRegion } from './common' const providerId = 'simplex' const storeId = 'co.edgesecure.simplex' const partnerIcon = 'simplex-logo-sm-square.png' @@ -313,6 +315,8 @@ export const simplexProvider: FiatProviderFactory = { throw new Error('Simplex unknown error') } const goodQuote = asSimplexQuoteSuccess(quote) + const quoteFiatAmount = goodQuote.fiat_money.amount.toString() + const quoteCryptAmount = goodQuote.digital_money.amount.toString() const paymentQuote: FiatProviderQuote = { providerId, @@ -323,8 +327,8 @@ export const simplexProvider: FiatProviderFactory = { displayCurrencyCode: params.displayCurrencyCode, isEstimate: false, fiatCurrencyCode: params.fiatCurrencyCode, - fiatAmount: goodQuote.fiat_money.amount.toString(), - cryptoAmount: goodQuote.digital_money.amount.toString(), + fiatAmount: quoteFiatAmount, + cryptoAmount: quoteCryptAmount, direction: params.direction, expirationDate: new Date(Date.now() + 8000), approveQuote: async (approveParams: FiatProviderApproveQuoteParams): Promise => { @@ -355,7 +359,46 @@ export const simplexProvider: FiatProviderFactory = { const url = `https://partners.simplex.com/?partner=${partner}&t=${token}` console.log('Approving simplex quote url=' + url) - await showUi.openExternalWebView({ url }) + await showUi.openExternalWebView({ + url, + providerId, + deeplinkHandler: async link => { + if (link.direction !== 'buy') return + + const orderId = link.query.orderId ?? 'unknown' + + switch (link.query.status) { + case 'success': { + await showUi.trackConversion('Buy_Success', { + conversionValues: { + conversionType: 'buy', + sourceFiatCurrencyCode: params.fiatCurrencyCode, + sourceFiatAmount: quoteFiatAmount, + destAmount: new CryptoAmount({ + currencyConfig: coreWallet.currencyConfig, + currencyCode: displayCurrencyCode, + exchangeAmount: quoteCryptAmount + }), + fiatProviderId: providerId, + orderId + } + }) + await showUi.exitScene() + break + } + case 'failure': { + console.log('Simplex WebView launch buy failure: ' + link.uri) + await showUi.showToast(lstrings.fiat_plugin_buy_failed_try_again, NOT_SUCCESS_TOAST_HIDE_MS) + await showUi.exitScene() + break + } + default: { + await showUi.showToast(lstrings.fiat_plugin_buy_unknown_status, NOT_SUCCESS_TOAST_HIDE_MS) + await showUi.exitScene() + } + } + } + }) }, closeQuote: async (): Promise => {} } From 2d2ec9a67521c9fcf150b1d2f5cbb9498629f71d Mon Sep 17 00:00:00 2001 From: Sam Holmes Date: Mon, 2 Dec 2024 15:35:53 -0800 Subject: [PATCH 29/67] Upgrade edge-currency-accountbased@^4.29.0 --- ios/Podfile.lock | 4 ++-- package.json | 2 +- yarn.lock | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index b0fe5404cc8..fe45729a2d2 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -17,7 +17,7 @@ PODS: - DoubleConversion (1.1.6) - edge-core-js (2.20.3): - React-Core - - edge-currency-accountbased (4.28.0): + - edge-currency-accountbased (4.29.0): - React-Core - edge-currency-plugins (3.4.4): - React-Core @@ -1081,7 +1081,7 @@ SPEC CHECKSUMS: disklet: e7ed3e673ccad9d175a1675f9f3589ffbf69a5fd DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 edge-core-js: 4d014907ea944569225308121d4ec14090a0516c - edge-currency-accountbased: 298a981da054f4d3a1c3600641c150526560db96 + edge-currency-accountbased: b4c3f2414bcb2bb543084859ec2d7b819f6faf91 edge-currency-plugins: 95577a282061148263207fad9befe11bb07a57c1 edge-exchange-plugins: 2883457575c970671c5e63e547907dd40234a323 edge-login-ui-rn: 70f8057108ae213e43583a0b3876c88c500c27bc diff --git a/package.json b/package.json index eb7f5d062c9..60ae2683a99 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "detect-bundler": "^1.1.0", "disklet": "^0.5.2", "edge-core-js": "^2.20.3", - "edge-currency-accountbased": "^4.28.0", + "edge-currency-accountbased": "^4.29.0", "edge-currency-monero": "^1.3.2", "edge-currency-plugins": "^3.4.4", "edge-exchange-plugins": "^2.14.0", diff --git a/yarn.lock b/yarn.lock index 0d028fb8520..b10bf4ba0a8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9324,10 +9324,10 @@ edge-core-js@^2.20.3: yaob "^0.3.12" yavent "^0.1.3" -edge-currency-accountbased@^4.28.0: - version "4.28.0" - resolved "https://registry.yarnpkg.com/edge-currency-accountbased/-/edge-currency-accountbased-4.28.0.tgz#1513d9aac63b5bcc0ca89094c2a7fb41a7c1d143" - integrity sha512-0SPiX6JC4HUl9arqJGr4HhHgyi0zdwgg7s1XoMLkggyahUzT+M7CygvCyC3TTdGKhCZkzKqa/Oy44UXbBk2dbA== +edge-currency-accountbased@^4.29.0: + version "4.29.0" + resolved "https://registry.yarnpkg.com/edge-currency-accountbased/-/edge-currency-accountbased-4.29.0.tgz#5cb5bc2fdfcf2ac4480a881e84a656723b62a52e" + integrity sha512-ORGLJeIUh/F153gUsGQ5Eh4xd37R0F9HmH2s6CCL9nmjF6pMXvdxzwHyB6xhXpgSHtm9Wa9qz5R8jYCJ/K5Png== dependencies: "@binance-chain/javascript-sdk" "^4.2.0" "@chain-registry/client" "^1.15.0" @@ -9348,7 +9348,7 @@ edge-currency-accountbased@^4.28.0: "@ton/ton" "^15.1.0" "@zondax/izari-filecoin" "^1.2.0" algosdk "^2.1.0" - biggystring "^4.1.3" + biggystring "^4.2.3" bip39 "^3.0.2" bs58 "4.0.1" chain-registry "^1.63.92" From a76b3a5f2a2075ec18d2b2a6d2b5c8e91208d66d Mon Sep 17 00:00:00 2001 From: peachbits Date: Mon, 2 Dec 2024 16:08:50 -0800 Subject: [PATCH 30/67] Upgrade edge-core-js to v2.21.0 --- ios/Podfile.lock | 4 ++-- package.json | 2 +- .../actions/TransactionExportActions.test.ts | 7 +++++++ .../components/ExchangeQuoteComponent.test.tsx | 4 +++- src/__tests__/components/TransactionListRow.test.tsx | 1 + src/__tests__/modals/AccelerateTxModal.test.tsx | 2 ++ src/__tests__/modals/AdvancedDetailsCard.test.tsx | 1 + src/__tests__/scenes/SwapConfirmationScene.test.tsx | 4 +++- src/__tests__/scenes/SwapSuccessScene.test.tsx | 1 + .../scenes/TransactionDetailsScene.test.tsx | 2 ++ .../scenes/MigrateWalletCalculateFeeScene.tsx | 1 + .../scenes/SweepPrivateKeyCalculateFeeScene.tsx | 1 + src/controllers/edgeProvider/EdgeProviderServer.tsx | 1 + .../edgeProvider/types/edgeProviderCleaners.ts | 8 +++++++- .../generic/policyAdapters/CoreumStakeKitAdaptor.ts | 3 +++ src/util/fake/fakeCurrencyPlugin.ts | 1 + yarn.lock | 12 ++++++------ 17 files changed, 43 insertions(+), 12 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index fe45729a2d2..0c0dc383a20 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -15,7 +15,7 @@ PODS: - disklet (0.5.2): - React - DoubleConversion (1.1.6) - - edge-core-js (2.20.3): + - edge-core-js (2.21.0): - React-Core - edge-currency-accountbased (4.29.0): - React-Core @@ -1080,7 +1080,7 @@ SPEC CHECKSUMS: CNIOWindows: 3047f2d8165848a3936a0a755fee27c6b5ee479b disklet: e7ed3e673ccad9d175a1675f9f3589ffbf69a5fd DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 - edge-core-js: 4d014907ea944569225308121d4ec14090a0516c + edge-core-js: 10f2bb3facfd5c5dced56cefcda54c90f82799b6 edge-currency-accountbased: b4c3f2414bcb2bb543084859ec2d7b819f6faf91 edge-currency-plugins: 95577a282061148263207fad9befe11bb07a57c1 edge-exchange-plugins: 2883457575c970671c5e63e547907dd40234a323 diff --git a/package.json b/package.json index 60ae2683a99..559193ab500 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "deepmerge": "^4.3.1", "detect-bundler": "^1.1.0", "disklet": "^0.5.2", - "edge-core-js": "^2.20.3", + "edge-core-js": "^2.21.0", "edge-currency-accountbased": "^4.29.0", "edge-currency-monero": "^1.3.2", "edge-currency-plugins": "^3.4.4", diff --git a/src/__tests__/actions/TransactionExportActions.test.ts b/src/__tests__/actions/TransactionExportActions.test.ts index 2264512570e..11d034760f1 100644 --- a/src/__tests__/actions/TransactionExportActions.test.ts +++ b/src/__tests__/actions/TransactionExportActions.test.ts @@ -23,6 +23,7 @@ const edgeTxs: EdgeTransaction[] = [ }, nativeAmount: '123000000', networkFee: '1000', + networkFees: [], ourReceiveAddresses: ['receiveaddress1', 'receiveaddress2'], parentNetworkFee: '10002', signedTx: '298t983y4t983y4t93y4g98oeshfgi4t89w394t', @@ -45,6 +46,7 @@ const edgeTxs: EdgeTransaction[] = [ }, nativeAmount: '-321000000', networkFee: '2000', + networkFees: [], ourReceiveAddresses: ['receiveaddress3', 'receiveaddress4'], parentNetworkFee: '20001', signedTx: 'fiuwh34f98h3tiuheirgserg', @@ -66,6 +68,7 @@ const edgeTxs: EdgeTransaction[] = [ }, nativeAmount: '-321000000', networkFee: '2000', + networkFees: [], ourReceiveAddresses: ['receiveaddress3', 'receiveaddress4'], isSend: false, signedTx: 'fiuwh34f98h3tiuheirgserg', @@ -87,6 +90,7 @@ const edgeTxs: EdgeTransaction[] = [ }, nativeAmount: '321000000', networkFee: '2000', + networkFees: [], ourReceiveAddresses: ['receiveaddress3', 'receiveaddress4'], isSend: true, signedTx: 'fiuwh34f98h3tiuheirgserg', @@ -109,6 +113,7 @@ const edgeTxs: EdgeTransaction[] = [ }, nativeAmount: '-321000000', networkFee: '0', + networkFees: [], ourReceiveAddresses: ['receiveaddress3', 'receiveaddress4'], parentNetworkFee: '20001', signedTx: 'fiuwh34f98h3tiuheirgserg', @@ -130,6 +135,7 @@ const edgeTxs: EdgeTransaction[] = [ }, nativeAmount: '-321000000', networkFee: '2000', + networkFees: [], ourReceiveAddresses: ['receiveaddress3', 'receiveaddress4'], isSend: true, signedTx: 'fiuwh34f98h3tiuheirgserg', @@ -147,6 +153,7 @@ const edgeTxs: EdgeTransaction[] = [ metadata: undefined, nativeAmount: '-321000000', networkFee: '2000', + networkFees: [], ourReceiveAddresses: ['receiveaddress3', 'receiveaddress4'], signedTx: 'fiuwh34f98h3tiuheirgserg', tokenId: null, diff --git a/src/__tests__/components/ExchangeQuoteComponent.test.tsx b/src/__tests__/components/ExchangeQuoteComponent.test.tsx index f607c4f3061..59aa653d91b 100644 --- a/src/__tests__/components/ExchangeQuoteComponent.test.tsx +++ b/src/__tests__/components/ExchangeQuoteComponent.test.tsx @@ -89,7 +89,8 @@ describe('ExchangeQuote', () => { toNativeAmount: '10000', networkFee: { currencyCode: 'BTC', - nativeAmount: '1' + nativeAmount: '1', + tokenId: null }, pluginId: 'bitcoin', approve: async () => { @@ -109,6 +110,7 @@ describe('ExchangeQuote', () => { }, nativeAmount: '123000000', networkFee: '1000', + networkFees: [], ourReceiveAddresses: ['receiveaddress1', 'receiveaddress2'], parentNetworkFee: '10002', signedTx: '298t983y4t983y4t93y4g98oeshfgi4t89w394t', diff --git a/src/__tests__/components/TransactionListRow.test.tsx b/src/__tests__/components/TransactionListRow.test.tsx index d4a1c463f7f..af84573a6dd 100644 --- a/src/__tests__/components/TransactionListRow.test.tsx +++ b/src/__tests__/components/TransactionListRow.test.tsx @@ -58,6 +58,7 @@ describe('TransactionListRow', () => { isSend: true, memos: [], networkFee: '100000', + networkFees: [], ourReceiveAddresses: [], signedTx: '0x12897491827459823745', tokenId: null, diff --git a/src/__tests__/modals/AccelerateTxModal.test.tsx b/src/__tests__/modals/AccelerateTxModal.test.tsx index b84a03bd69d..5a37f16e607 100644 --- a/src/__tests__/modals/AccelerateTxModal.test.tsx +++ b/src/__tests__/modals/AccelerateTxModal.test.tsx @@ -33,6 +33,7 @@ describe('AccelerateTxModalComponent', () => { memos: [], nativeAmount: '-681', networkFee: '681', + networkFees: [], otherParams: {}, ourReceiveAddresses: ['123123123'], signedTx: '', @@ -48,6 +49,7 @@ describe('AccelerateTxModalComponent', () => { memos: [], nativeAmount: '-1362', networkFee: '1362', + networkFees: [], otherParams: {}, ourReceiveAddresses: ['123123123'], signedTx: '', diff --git a/src/__tests__/modals/AdvancedDetailsCard.test.tsx b/src/__tests__/modals/AdvancedDetailsCard.test.tsx index 00d5447b13e..f71cb8ef90b 100644 --- a/src/__tests__/modals/AdvancedDetailsCard.test.tsx +++ b/src/__tests__/modals/AdvancedDetailsCard.test.tsx @@ -18,6 +18,7 @@ describe('AdvancedDetailsCard', () => { memos: [], nativeAmount: '-681', networkFee: '681', + networkFees: [], otherParams: {}, ourReceiveAddresses: ['123123123'], signedTx: '', diff --git a/src/__tests__/scenes/SwapConfirmationScene.test.tsx b/src/__tests__/scenes/SwapConfirmationScene.test.tsx index 4bd64124584..2d4f2391d02 100644 --- a/src/__tests__/scenes/SwapConfirmationScene.test.tsx +++ b/src/__tests__/scenes/SwapConfirmationScene.test.tsx @@ -99,7 +99,8 @@ describe('SwapConfirmationScene', () => { toNativeAmount: '10000', networkFee: { currencyCode: 'BTC', - nativeAmount: '1' + nativeAmount: '1', + tokenId: null }, pluginId: 'bitcoin', approve: async () => { @@ -119,6 +120,7 @@ describe('SwapConfirmationScene', () => { }, nativeAmount: '123000000', networkFee: '1000', + networkFees: [], ourReceiveAddresses: ['receiveaddress1', 'receiveaddress2'], parentNetworkFee: '10002', signedTx: '298t983y4t983y4t93y4g98oeshfgi4t89w394t', diff --git a/src/__tests__/scenes/SwapSuccessScene.test.tsx b/src/__tests__/scenes/SwapSuccessScene.test.tsx index 19f42ddb85e..a5ad4702471 100644 --- a/src/__tests__/scenes/SwapSuccessScene.test.tsx +++ b/src/__tests__/scenes/SwapSuccessScene.test.tsx @@ -74,6 +74,7 @@ describe('SwapSuccessSceneComponent', () => { metadata: { name: 'timmy' }, nativeAmount: '12300000', networkFee: '1', + networkFees: [], otherParams: {}, ourReceiveAddresses: ['this is an address'], signedTx: 'this is a signed tx', diff --git a/src/__tests__/scenes/TransactionDetailsScene.test.tsx b/src/__tests__/scenes/TransactionDetailsScene.test.tsx index 38ac04003b3..06781eb366d 100644 --- a/src/__tests__/scenes/TransactionDetailsScene.test.tsx +++ b/src/__tests__/scenes/TransactionDetailsScene.test.tsx @@ -82,6 +82,7 @@ describe('TransactionDetailsScene', () => { metadata: { name: 'timmy' }, nativeAmount: '12300000', networkFee: '1', + networkFees: [], otherParams: {}, ourReceiveAddresses: ['this is an address'], signedTx: 'this is a signed tx', @@ -116,6 +117,7 @@ describe('TransactionDetailsScene', () => { }, nativeAmount: '-12300000', networkFee: '1', + networkFees: [], otherParams: {}, ourReceiveAddresses: ['this is an address'], signedTx: 'this is a signed tx', diff --git a/src/components/scenes/MigrateWalletCalculateFeeScene.tsx b/src/components/scenes/MigrateWalletCalculateFeeScene.tsx index 10076a5355e..6ff555aa146 100644 --- a/src/components/scenes/MigrateWalletCalculateFeeScene.tsx +++ b/src/components/scenes/MigrateWalletCalculateFeeScene.tsx @@ -97,6 +97,7 @@ const MigrateWalletCalculateFeeComponent = (props: Props) => { isSend: true, nativeAmount: '0', networkFee: fee, + networkFees: [], ourReceiveAddresses: [], signedTx: '', tokenId: null, diff --git a/src/components/scenes/SweepPrivateKeyCalculateFeeScene.tsx b/src/components/scenes/SweepPrivateKeyCalculateFeeScene.tsx index 146431b11de..33e167e916e 100644 --- a/src/components/scenes/SweepPrivateKeyCalculateFeeScene.tsx +++ b/src/components/scenes/SweepPrivateKeyCalculateFeeScene.tsx @@ -147,6 +147,7 @@ const SweepPrivateKeyCalculateFeeComponent = (props: Props) => { isSend: true, nativeAmount: '0', networkFee: '0', + networkFees: [], ourReceiveAddresses: [], signedTx: '', tokenId: null, diff --git a/src/controllers/edgeProvider/EdgeProviderServer.tsx b/src/controllers/edgeProvider/EdgeProviderServer.tsx index 96f467329bc..3898c339345 100644 --- a/src/controllers/edgeProvider/EdgeProviderServer.tsx +++ b/src/controllers/edgeProvider/EdgeProviderServer.tsx @@ -578,6 +578,7 @@ function cleanTx(tx: EdgeTransaction): EdgeTransaction { metadata: tx.metadata, nativeAmount: tx.nativeAmount, networkFee: tx.networkFee, + networkFees: [], // networkFeeOption: tx.networkFeeOption, ourReceiveAddresses: tx.ourReceiveAddresses, parentNetworkFee: tx.parentNetworkFee, diff --git a/src/controllers/edgeProvider/types/edgeProviderCleaners.ts b/src/controllers/edgeProvider/types/edgeProviderCleaners.ts index 897b7718489..b109e5da337 100644 --- a/src/controllers/edgeProvider/types/edgeProviderCleaners.ts +++ b/src/controllers/edgeProvider/types/edgeProviderCleaners.ts @@ -1,5 +1,5 @@ import { asArray, asBoolean, asEither, asNumber, asObject, asOptional, asString, asTuple, asUnknown, asValue, Cleaner } from 'cleaners' -import { EdgeMemo, EdgeMetadata, EdgeNetworkFee, EdgeReceiveAddress, EdgeTransaction } from 'edge-core-js' +import { EdgeMemo, EdgeMetadata, EdgeNetworkFee, EdgeReceiveAddress, EdgeTransaction, EdgeTxAmount } from 'edge-core-js' import { asEdgeAsset, asEdgeCurrencyCode, asEdgeTokenId } from '../../../types/types' import { @@ -25,6 +25,11 @@ const asEdgeNetworkFee = asObject({ nativeAmount: asString }) +const asEdgeTxAmount = asObject({ + nativeAmount: asString, + tokenId: asEdgeTokenId +}) + const asEdgeReceiveAddress = asObject({ publicAddress: asString, segwitAddress: asOptional(asString), @@ -52,6 +57,7 @@ const asEdgeTransaction = asObject({ // Amounts: nativeAmount: asString, networkFee: asString, + networkFees: asArray(asEdgeTxAmount), parentNetworkFee: asOptional(asString), // Confirmation status: diff --git a/src/plugins/stake-plugins/generic/policyAdapters/CoreumStakeKitAdaptor.ts b/src/plugins/stake-plugins/generic/policyAdapters/CoreumStakeKitAdaptor.ts index f4ec7fa4928..9765d7cf42f 100644 --- a/src/plugins/stake-plugins/generic/policyAdapters/CoreumStakeKitAdaptor.ts +++ b/src/plugins/stake-plugins/generic/policyAdapters/CoreumStakeKitAdaptor.ts @@ -128,6 +128,7 @@ export const makeSkateKitAdapter = (policyConfig: StakePolicyConfig Date: Mon, 2 Dec 2024 16:14:19 -0800 Subject: [PATCH 31/67] Upgrade edge-exchange-plugins to v2.15.0 --- ios/Podfile.lock | 4 ++-- package.json | 2 +- yarn.lock | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 0c0dc383a20..5da18253851 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -21,7 +21,7 @@ PODS: - React-Core - edge-currency-plugins (3.4.4): - React-Core - - edge-exchange-plugins (2.14.0): + - edge-exchange-plugins (2.15.0): - React-Core - edge-login-ui-rn (3.24.0): - React-Core @@ -1083,7 +1083,7 @@ SPEC CHECKSUMS: edge-core-js: 10f2bb3facfd5c5dced56cefcda54c90f82799b6 edge-currency-accountbased: b4c3f2414bcb2bb543084859ec2d7b819f6faf91 edge-currency-plugins: 95577a282061148263207fad9befe11bb07a57c1 - edge-exchange-plugins: 2883457575c970671c5e63e547907dd40234a323 + edge-exchange-plugins: c5d15492601cda268ec9f26eafc188f8bb8b9450 edge-login-ui-rn: 70f8057108ae213e43583a0b3876c88c500c27bc EXApplication: d8f53a7eee90a870a75656280e8d4b85726ea903 EXConstants: f348da07e21b23d2b085e270d7b74f282df1a7d9 diff --git a/package.json b/package.json index 559193ab500..57e85a8e8b0 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ "edge-currency-accountbased": "^4.29.0", "edge-currency-monero": "^1.3.2", "edge-currency-plugins": "^3.4.4", - "edge-exchange-plugins": "^2.14.0", + "edge-exchange-plugins": "^2.15.0", "edge-info-server": "^3.0.1", "edge-login-ui-rn": "^3.24.0", "ethers": "^5.7.2", diff --git a/yarn.lock b/yarn.lock index bf9dacb3360..11fe019539c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9417,13 +9417,13 @@ edge-currency-plugins@^3.4.4: wifgrs "^2.0.6" ws "^7.4.6" -edge-exchange-plugins@^2.14.0: - version "2.14.0" - resolved "https://registry.yarnpkg.com/edge-exchange-plugins/-/edge-exchange-plugins-2.14.0.tgz#a9c1609f7f6f6930f36bdaa1f1941befa4ed840a" - integrity sha512-JXJK21gFoyAqKjLRmYOFU29NG3fQfirCH7Ot7OKN6Oa2/xp4IJI9QLUeyGbMehCR8fqTIY9iI3J1Tg72zlWO2w== +edge-exchange-plugins@^2.15.0: + version "2.15.0" + resolved "https://registry.yarnpkg.com/edge-exchange-plugins/-/edge-exchange-plugins-2.15.0.tgz#e222fb160e9ff0680b5b8e570233b72506c0979a" + integrity sha512-z6PiEI3eUS/2oOb/lH/07LM1BosZRjAV11pWDun403wW6xkBMApPNPf2ks93ksuJk5tTLNU+tKJLBI06f2NP5w== dependencies: "@cosmjs/encoding" "^0.32.2" - biggystring "^4.1.3" + biggystring "^4.2.3" cleaners "^0.3.13" ethers "^5.7.0" regenerator-runtime "0.13.11" From 95324443b094ba3048aa3bdf6879198baf6bcc5a Mon Sep 17 00:00:00 2001 From: Matthew Date: Fri, 15 Nov 2024 15:56:55 -0800 Subject: [PATCH 32/67] Use getAddresses in Request scene --- src/components/scenes/RequestScene.tsx | 43 ++++++++++++++------------ src/locales/en_US.ts | 3 ++ src/locales/strings/enUS.json | 3 ++ 3 files changed, 30 insertions(+), 19 deletions(-) diff --git a/src/components/scenes/RequestScene.tsx b/src/components/scenes/RequestScene.tsx index 2f58a044991..ade12d9ce8e 100644 --- a/src/components/scenes/RequestScene.tsx +++ b/src/components/scenes/RequestScene.tsx @@ -19,6 +19,7 @@ import { getExchangeRate } from '../../selectors/WalletSelectors' import { config } from '../../theme/appConfig' import { useDispatch, useSelector } from '../../types/reactRedux' import { EdgeAppSceneProps, NavigationBase } from '../../types/routerTypes' +import { StringMap } from '../../types/types' import { getCurrencyCode, isKeysOnlyPlugin } from '../../util/CurrencyInfoHelpers' import { getAvailableBalance, getWalletName } from '../../util/CurrencyWalletHelpers' import { triggerHaptic } from '../../util/haptic' @@ -143,28 +144,32 @@ export class RequestSceneComponent extends React.Component address.addressType === 'segwitAddress') + const addresses: AddressInfo[] = allAddresses.map(edgeAddress => { + let label: string = lstrings.request_qr_your_wallet_address + + if (hasSegwitAddress && edgeAddress.addressType === 'publicAddress') { + label = lstrings.request_qr_your_wrapped_segwit_address + } else if (addressTypeLabelMap[edgeAddress.addressType] != null) { + label = addressTypeLabelMap[edgeAddress.addressType] + } + + return { + addressString: edgeAddress.publicAddress, + label + } }) - // Handle legacyAddress - if (receiveAddress.legacyAddress != null) { - addresses.push({ - addressString: receiveAddress.legacyAddress, - label: lstrings.request_qr_your_legacy_address - }) - } this.setState({ addresses, selectedAddress: addresses[0] }) } diff --git a/src/locales/en_US.ts b/src/locales/en_US.ts index d09954e4a3b..c1ab3a2ae7f 100644 --- a/src/locales/en_US.ts +++ b/src/locales/en_US.ts @@ -368,6 +368,9 @@ const strings = { request_qr_your_wrapped_segwit_address: 'Your Wrapped-Segwit Address', request_qr_your_legacy_address: 'Your Legacy Address', request_qr_your_segwit_address: 'Your Segwit Address', + request_qr_your_sapling_address: 'Your Sapling Address (shielded)', + request_qr_your_transparent_address: 'Your Transparent Address (auto-shielded)', + request_qr_your_unified_address: 'Your Unified Address (shielded)', request_review_question_title: 'Enjoying %1$s?', request_review_question_subtitle: 'Please give us a review', request_review_answer_no: 'No Thanks', diff --git a/src/locales/strings/enUS.json b/src/locales/strings/enUS.json index 068ee02352f..b24ed81c0c1 100644 --- a/src/locales/strings/enUS.json +++ b/src/locales/strings/enUS.json @@ -305,6 +305,9 @@ "request_qr_your_wrapped_segwit_address": "Your Wrapped-Segwit Address", "request_qr_your_legacy_address": "Your Legacy Address", "request_qr_your_segwit_address": "Your Segwit Address", + "request_qr_your_sapling_address": "Your Sapling Address (shielded)", + "request_qr_your_transparent_address": "Your Transparent Address (auto-shielded)", + "request_qr_your_unified_address": "Your Unified Address (shielded)", "request_review_question_title": "Enjoying %1$s?", "request_review_question_subtitle": "Please give us a review", "request_review_answer_no": "No Thanks", From 199aa096f8e9289e7c0b76373a52063120d76d16 Mon Sep 17 00:00:00 2001 From: peachbits Date: Mon, 2 Dec 2024 16:36:11 -0800 Subject: [PATCH 33/67] Add Sideshift private key to ENV config --- src/envConfig.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/envConfig.ts b/src/envConfig.ts index 5aee164ff03..2c7072815f4 100644 --- a/src/envConfig.ts +++ b/src/envConfig.ts @@ -261,7 +261,8 @@ export const asEnvConfig = asObject({ SEPOLIA_INIT: asCorePluginInit(asEvmApiKeys), SIDESHIFT_INIT: asCorePluginInit( asObject({ - affiliateId: asOptional(asString, '') + affiliateId: asOptional(asString, ''), + privateKey: asOptional(asString) }).withRest ), SOLANA_INIT: asCorePluginInit( From 170641fa769c76b9335a87a1f563a7349bc8b2f5 Mon Sep 17 00:00:00 2001 From: Paul V Puey Date: Mon, 2 Dec 2024 17:01:31 -0800 Subject: [PATCH 34/67] New translations enus.json (French) --- src/locales/strings/fr.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/locales/strings/fr.json b/src/locales/strings/fr.json index 4d300de877a..bd4c0c40d23 100644 --- a/src/locales/strings/fr.json +++ b/src/locales/strings/fr.json @@ -305,6 +305,9 @@ "request_qr_your_wrapped_segwit_address": "Your Wrapped-Segwit Address", "request_qr_your_legacy_address": "Your Legacy Address", "request_qr_your_segwit_address": "Your Segwit Address", + "request_qr_your_sapling_address": "Your Sapling Address (shielded)", + "request_qr_your_transparent_address": "Your Transparent Address (auto-shielded)", + "request_qr_your_unified_address": "Your Unified Address (shielded)", "request_review_question_title": "Enjoying %1$s?", "request_review_question_subtitle": "Please give us a review", "request_review_answer_no": "No Thanks", @@ -1225,6 +1228,7 @@ "stake_earn_1s": "Earn: %1$s", "stake_earning_1s": "Earning: %1$s", "stake_apy_1s": "%1$s APY", + "stake_stable_apy": "Stable APY", "stake_variable_apy": "Variable APY", "stake_s_staked": "%s Staked", "stake_s_earned": "%s Earned", @@ -1294,11 +1298,13 @@ "fiat_plugin_fetching_assets": "Fetching supported assets", "fiat_plugin_sell_cancelled": "Sell order cancelled", "fiat_plugin_finalizing_quote": "Finalizing your exchange quote. Please wait as this may take up to a minute", + "fiat_plugin_buy_cancelled": "Buy order cancelled", "fiat_plugin_buy_complete_title": "Buy Order Complete", "fiat_plugin_buy_complete_message_s": "Your buy order of %1$s %2$s with %3$s %4$s has been completed.", "fiat_plugin_buy_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your wallet.", "fiat_plugin_buy_complete_message_2_hours_s": "Please allow up to %1$s hours for the funds to appear in your wallet.", "fiat_plugin_buy_failed_try_again": "Buy order failed. Please try again", + "fiat_plugin_buy_unknown_status": "Unknown order status upon completion. Please contact support for assistence.", "fiat_plugin_sell_complete_title": "Sell Order Complete", "fiat_plugin_sell_complete_message_s": "Your sell order of %1$s %2$s for %3$s %4$s has been completed.", "fiat_plugin_sell_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your account.", From 5a24fda93419b3f5135bb733ee949e75ed772711 Mon Sep 17 00:00:00 2001 From: Paul V Puey Date: Mon, 2 Dec 2024 17:01:33 -0800 Subject: [PATCH 35/67] New translations enus.json (Spanish) --- src/locales/strings/es.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/locales/strings/es.json b/src/locales/strings/es.json index 5b56716183b..173a0d7f42c 100644 --- a/src/locales/strings/es.json +++ b/src/locales/strings/es.json @@ -305,6 +305,9 @@ "request_qr_your_wrapped_segwit_address": "Tu dirección Wrapped-Segwit", "request_qr_your_legacy_address": "Tu dirección Legacy", "request_qr_your_segwit_address": "Tu dirección Segwit", + "request_qr_your_sapling_address": "Your Sapling Address (shielded)", + "request_qr_your_transparent_address": "Your Transparent Address (auto-shielded)", + "request_qr_your_unified_address": "Your Unified Address (shielded)", "request_review_question_title": "¿Disfrutando %1$s?", "request_review_question_subtitle": "Por favor, danos una reseña", "request_review_answer_no": "No, gracias", @@ -1225,6 +1228,7 @@ "stake_earn_1s": "Earn: %1$s", "stake_earning_1s": "Earning: %1$s", "stake_apy_1s": "%1$s APY", + "stake_stable_apy": "Stable APY", "stake_variable_apy": "Variable APY", "stake_s_staked": "%s Staked", "stake_s_earned": "%s Earned", @@ -1294,11 +1298,13 @@ "fiat_plugin_fetching_assets": "Fetching supported assets", "fiat_plugin_sell_cancelled": "Sell order cancelled", "fiat_plugin_finalizing_quote": "Finalizing your exchange quote. Please wait as this may take up to a minute", + "fiat_plugin_buy_cancelled": "Buy order cancelled", "fiat_plugin_buy_complete_title": "Buy Order Complete", "fiat_plugin_buy_complete_message_s": "Your buy order of %1$s %2$s with %3$s %4$s has been completed.", "fiat_plugin_buy_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your wallet.", "fiat_plugin_buy_complete_message_2_hours_s": "Please allow up to %1$s hours for the funds to appear in your wallet.", "fiat_plugin_buy_failed_try_again": "Buy order failed. Please try again", + "fiat_plugin_buy_unknown_status": "Unknown order status upon completion. Please contact support for assistence.", "fiat_plugin_sell_complete_title": "Sell Order Complete", "fiat_plugin_sell_complete_message_s": "Your sell order of %1$s %2$s for %3$s %4$s has been completed.", "fiat_plugin_sell_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your account.", From 2b3c5e987268c9ddd01f417959a347c95e3794da Mon Sep 17 00:00:00 2001 From: Paul V Puey Date: Mon, 2 Dec 2024 17:01:34 -0800 Subject: [PATCH 36/67] New translations enus.json (German) --- src/locales/strings/de.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/locales/strings/de.json b/src/locales/strings/de.json index 19444fb4635..a85b35f5c6e 100644 --- a/src/locales/strings/de.json +++ b/src/locales/strings/de.json @@ -305,6 +305,9 @@ "request_qr_your_wrapped_segwit_address": "Your Wrapped-Segwit Address", "request_qr_your_legacy_address": "Your Legacy Address", "request_qr_your_segwit_address": "Your Segwit Address", + "request_qr_your_sapling_address": "Your Sapling Address (shielded)", + "request_qr_your_transparent_address": "Your Transparent Address (auto-shielded)", + "request_qr_your_unified_address": "Your Unified Address (shielded)", "request_review_question_title": "Gefällt Ihnen %s?", "request_review_question_subtitle": "Bitte bewerten Sie uns", "request_review_answer_no": "Nein, danke", @@ -1225,6 +1228,7 @@ "stake_earn_1s": "Earn: %1$s", "stake_earning_1s": "Earning: %1$s", "stake_apy_1s": "%1$s APY", + "stake_stable_apy": "Stable APY", "stake_variable_apy": "Variable APY", "stake_s_staked": "%s Staked", "stake_s_earned": "%s Earned", @@ -1294,11 +1298,13 @@ "fiat_plugin_fetching_assets": "Fetching supported assets", "fiat_plugin_sell_cancelled": "Sell order cancelled", "fiat_plugin_finalizing_quote": "Finalizing your exchange quote. Please wait as this may take up to a minute", + "fiat_plugin_buy_cancelled": "Buy order cancelled", "fiat_plugin_buy_complete_title": "Buy Order Complete", "fiat_plugin_buy_complete_message_s": "Your buy order of %1$s %2$s with %3$s %4$s has been completed.", "fiat_plugin_buy_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your wallet.", "fiat_plugin_buy_complete_message_2_hours_s": "Please allow up to %1$s hours for the funds to appear in your wallet.", "fiat_plugin_buy_failed_try_again": "Buy order failed. Please try again", + "fiat_plugin_buy_unknown_status": "Unknown order status upon completion. Please contact support for assistence.", "fiat_plugin_sell_complete_title": "Sell Order Complete", "fiat_plugin_sell_complete_message_s": "Your sell order of %1$s %2$s for %3$s %4$s has been completed.", "fiat_plugin_sell_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your account.", From cb0d3a255814fb4a8b6f7c25cd056211db2df348 Mon Sep 17 00:00:00 2001 From: Paul V Puey Date: Mon, 2 Dec 2024 17:01:35 -0800 Subject: [PATCH 37/67] New translations enus.json (Italian) --- src/locales/strings/it.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/locales/strings/it.json b/src/locales/strings/it.json index 2f112f85cf5..cca8ada2c2f 100644 --- a/src/locales/strings/it.json +++ b/src/locales/strings/it.json @@ -305,6 +305,9 @@ "request_qr_your_wrapped_segwit_address": "Il Tuo Indirizzo Wrapped-Segwit", "request_qr_your_legacy_address": "Il Tuo Indirizzo Legacy", "request_qr_your_segwit_address": "Il Tuo Indirizzo Segwit", + "request_qr_your_sapling_address": "Your Sapling Address (shielded)", + "request_qr_your_transparent_address": "Your Transparent Address (auto-shielded)", + "request_qr_your_unified_address": "Your Unified Address (shielded)", "request_review_question_title": "Ti piace %1$s?", "request_review_question_subtitle": "Per favore, scrivi una recensione", "request_review_answer_no": "No grazie", @@ -668,7 +671,7 @@ "transaction_details_fee_warning": "Commissioni di rete elevate", "transaction_details_swap": "Scambia Fondi", "transaction_details_swap_network_fee": "Commissioni di rete per lo scambio", - "transaction_details_swap_order_cancel": "Ordine di scambio annullato", + "transaction_details_swap_order_cancel": "Swap Order Cancelled", "transaction_details_swap_order_post": "Ordine di scambio aperto", "transaction_details_swap_order_fill": "Ordine di scambio completato", "transaction_details_claim": "Fondi in stake richiesti", @@ -1225,6 +1228,7 @@ "stake_earn_1s": "Guadagna: %1$s", "stake_earning_1s": "Stai guadagnando: %1$s", "stake_apy_1s": "APY %1$s", + "stake_stable_apy": "APY stabile", "stake_variable_apy": "APY variabile", "stake_s_staked": "%s in Stake", "stake_s_earned": "%s Guadagnato", @@ -1294,11 +1298,13 @@ "fiat_plugin_fetching_assets": "Recupero degli asset supportati", "fiat_plugin_sell_cancelled": "Ordine di vendita annullato", "fiat_plugin_finalizing_quote": "Finalizzazione della quota di scambio. Potrebbe richiedere fino a un minuto", + "fiat_plugin_buy_cancelled": "Buy order cancelled", "fiat_plugin_buy_complete_title": "Ordine di vendita completato", "fiat_plugin_buy_complete_message_s": "Il tuo ordine di acquisto di %1$s %2$s con %3$s %4$s è stato completato.", "fiat_plugin_buy_complete_message_2_hour_s": "Si prega di attendere fino a %1$s ore perché i fondi appaiano nel tuo portafoglio.", "fiat_plugin_buy_complete_message_2_hours_s": "Si prega di attendere fino a %1$s ore per i fondi di apparire nel tuo portafoglio.", "fiat_plugin_buy_failed_try_again": "Ordine di acquisto non riuscito. Riprova", + "fiat_plugin_buy_unknown_status": "Unknown order status upon completion. Please contact support for assistence.", "fiat_plugin_sell_complete_title": "Ordine di vendita completato", "fiat_plugin_sell_complete_message_s": "Il tuo ordine di vendita di %1$s %2$s per %3$s %4$s è stato completato.", "fiat_plugin_sell_complete_message_2_hour_s": "Si prega di attendere fino a %1$s ore perché i fondi appaiano nel tuo account.", From ae98194e1da407ecec560a19a91e2c1e1c3bc142 Mon Sep 17 00:00:00 2001 From: Paul V Puey Date: Mon, 2 Dec 2024 17:01:36 -0800 Subject: [PATCH 38/67] New translations enus.json (Japanese) --- src/locales/strings/ja.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/locales/strings/ja.json b/src/locales/strings/ja.json index b97d733515f..0eff921ea71 100644 --- a/src/locales/strings/ja.json +++ b/src/locales/strings/ja.json @@ -305,6 +305,9 @@ "request_qr_your_wrapped_segwit_address": "Wrapped-Segwitアドレス", "request_qr_your_legacy_address": "Legacyアドレスを使う", "request_qr_your_segwit_address": "あなたのSegwitアドレス", + "request_qr_your_sapling_address": "Your Sapling Address (shielded)", + "request_qr_your_transparent_address": "Your Transparent Address (auto-shielded)", + "request_qr_your_unified_address": "Your Unified Address (shielded)", "request_review_question_title": "%1$s を快適にご利用いただけていますか?", "request_review_question_subtitle": "レビューをお願いします", "request_review_answer_no": "結構です", @@ -1225,6 +1228,7 @@ "stake_earn_1s": "Earn: %1$s", "stake_earning_1s": "Earning: %1$s", "stake_apy_1s": "%1$s APY", + "stake_stable_apy": "Stable APY", "stake_variable_apy": "Variable APY", "stake_s_staked": "%s ステーク済み", "stake_s_earned": "%s 獲得", @@ -1294,11 +1298,13 @@ "fiat_plugin_fetching_assets": "サポートされている資産を取得中", "fiat_plugin_sell_cancelled": "Sell order cancelled", "fiat_plugin_finalizing_quote": "Finalizing your exchange quote. Please wait as this may take up to a minute", + "fiat_plugin_buy_cancelled": "Buy order cancelled", "fiat_plugin_buy_complete_title": "Buy Order Complete", "fiat_plugin_buy_complete_message_s": "Your buy order of %1$s %2$s with %3$s %4$s has been completed.", "fiat_plugin_buy_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your wallet.", "fiat_plugin_buy_complete_message_2_hours_s": "Please allow up to %1$s hours for the funds to appear in your wallet.", "fiat_plugin_buy_failed_try_again": "Buy order failed. Please try again", + "fiat_plugin_buy_unknown_status": "Unknown order status upon completion. Please contact support for assistence.", "fiat_plugin_sell_complete_title": "Sell Order Complete", "fiat_plugin_sell_complete_message_s": "Your sell order of %1$s %2$s for %3$s %4$s has been completed.", "fiat_plugin_sell_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your account.", From 0f2066dc8ca6e393f13829a4cbcbae21472e4607 Mon Sep 17 00:00:00 2001 From: Paul V Puey Date: Mon, 2 Dec 2024 17:01:37 -0800 Subject: [PATCH 39/67] New translations enus.json (Korean) --- src/locales/strings/ko.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/locales/strings/ko.json b/src/locales/strings/ko.json index 89881ddaad0..645f8fb4287 100644 --- a/src/locales/strings/ko.json +++ b/src/locales/strings/ko.json @@ -305,6 +305,9 @@ "request_qr_your_wrapped_segwit_address": "Your Wrapped-Segwit Address", "request_qr_your_legacy_address": "Your Legacy Address", "request_qr_your_segwit_address": "Your Segwit Address", + "request_qr_your_sapling_address": "Your Sapling Address (shielded)", + "request_qr_your_transparent_address": "Your Transparent Address (auto-shielded)", + "request_qr_your_unified_address": "Your Unified Address (shielded)", "request_review_question_title": "Enjoying %1$s?", "request_review_question_subtitle": "Please give us a review", "request_review_answer_no": "No Thanks", @@ -1225,6 +1228,7 @@ "stake_earn_1s": "Earn: %1$s", "stake_earning_1s": "Earning: %1$s", "stake_apy_1s": "%1$s APY", + "stake_stable_apy": "Stable APY", "stake_variable_apy": "Variable APY", "stake_s_staked": "%s Staked", "stake_s_earned": "%s Earned", @@ -1294,11 +1298,13 @@ "fiat_plugin_fetching_assets": "Fetching supported assets", "fiat_plugin_sell_cancelled": "Sell order cancelled", "fiat_plugin_finalizing_quote": "Finalizing your exchange quote. Please wait as this may take up to a minute", + "fiat_plugin_buy_cancelled": "Buy order cancelled", "fiat_plugin_buy_complete_title": "Buy Order Complete", "fiat_plugin_buy_complete_message_s": "Your buy order of %1$s %2$s with %3$s %4$s has been completed.", "fiat_plugin_buy_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your wallet.", "fiat_plugin_buy_complete_message_2_hours_s": "Please allow up to %1$s hours for the funds to appear in your wallet.", "fiat_plugin_buy_failed_try_again": "Buy order failed. Please try again", + "fiat_plugin_buy_unknown_status": "Unknown order status upon completion. Please contact support for assistence.", "fiat_plugin_sell_complete_title": "Sell Order Complete", "fiat_plugin_sell_complete_message_s": "Your sell order of %1$s %2$s for %3$s %4$s has been completed.", "fiat_plugin_sell_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your account.", From 5735f1f2e29b5ae731424d5367108b644a040a34 Mon Sep 17 00:00:00 2001 From: Paul V Puey Date: Mon, 2 Dec 2024 17:01:38 -0800 Subject: [PATCH 40/67] New translations enus.json (Portuguese) --- src/locales/strings/pt.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/locales/strings/pt.json b/src/locales/strings/pt.json index f4ab0e9723b..679ec413e60 100644 --- a/src/locales/strings/pt.json +++ b/src/locales/strings/pt.json @@ -305,6 +305,9 @@ "request_qr_your_wrapped_segwit_address": "Seu endereço Wrapped-Segwit", "request_qr_your_legacy_address": "O seu endereço Legacy", "request_qr_your_segwit_address": "O seu endereço Segwit", + "request_qr_your_sapling_address": "Your Sapling Address (shielded)", + "request_qr_your_transparent_address": "Your Transparent Address (auto-shielded)", + "request_qr_your_unified_address": "Your Unified Address (shielded)", "request_review_question_title": "Está gostando da %1$s?", "request_review_question_subtitle": "Por favor, deixe-nos uma avaliação", "request_review_answer_no": "Não, obrigado", @@ -1225,6 +1228,7 @@ "stake_earn_1s": "Earn: %1$s", "stake_earning_1s": "Earning: %1$s", "stake_apy_1s": "%1$s APY", + "stake_stable_apy": "Stable APY", "stake_variable_apy": "Variable APY", "stake_s_staked": "%s Staked", "stake_s_earned": "%s Ganhos", @@ -1294,11 +1298,13 @@ "fiat_plugin_fetching_assets": "Buscando ativos suportados", "fiat_plugin_sell_cancelled": "Sell order cancelled", "fiat_plugin_finalizing_quote": "Finalizing your exchange quote. Please wait as this may take up to a minute", + "fiat_plugin_buy_cancelled": "Buy order cancelled", "fiat_plugin_buy_complete_title": "Buy Order Complete", "fiat_plugin_buy_complete_message_s": "Your buy order of %1$s %2$s with %3$s %4$s has been completed.", "fiat_plugin_buy_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your wallet.", "fiat_plugin_buy_complete_message_2_hours_s": "Please allow up to %1$s hours for the funds to appear in your wallet.", "fiat_plugin_buy_failed_try_again": "Buy order failed. Please try again", + "fiat_plugin_buy_unknown_status": "Unknown order status upon completion. Please contact support for assistence.", "fiat_plugin_sell_complete_title": "Sell Order Complete", "fiat_plugin_sell_complete_message_s": "Your sell order of %1$s %2$s for %3$s %4$s has been completed.", "fiat_plugin_sell_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your account.", From 759e035a504532dda81cbbeb59a504bf8fe0cfa3 Mon Sep 17 00:00:00 2001 From: Paul V Puey Date: Mon, 2 Dec 2024 17:01:39 -0800 Subject: [PATCH 41/67] New translations enus.json (Russian) --- src/locales/strings/ru.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/locales/strings/ru.json b/src/locales/strings/ru.json index 08949126ccf..f87f0d25e6b 100644 --- a/src/locales/strings/ru.json +++ b/src/locales/strings/ru.json @@ -305,6 +305,9 @@ "request_qr_your_wrapped_segwit_address": "Your Wrapped-Segwit Address", "request_qr_your_legacy_address": "Your Legacy Address", "request_qr_your_segwit_address": "Your Segwit Address", + "request_qr_your_sapling_address": "Your Sapling Address (shielded)", + "request_qr_your_transparent_address": "Your Transparent Address (auto-shielded)", + "request_qr_your_unified_address": "Your Unified Address (shielded)", "request_review_question_title": "Вам нравится %1$s?", "request_review_question_subtitle": "Пожалуйста, оставьте отзыв", "request_review_answer_no": "Нет, спасибо", @@ -1225,6 +1228,7 @@ "stake_earn_1s": "Earn: %1$s", "stake_earning_1s": "Earning: %1$s", "stake_apy_1s": "%1$s APY", + "stake_stable_apy": "Stable APY", "stake_variable_apy": "Variable APY", "stake_s_staked": "%s Staked", "stake_s_earned": "%s Earned", @@ -1294,11 +1298,13 @@ "fiat_plugin_fetching_assets": "Fetching supported assets", "fiat_plugin_sell_cancelled": "Sell order cancelled", "fiat_plugin_finalizing_quote": "Finalizing your exchange quote. Please wait as this may take up to a minute", + "fiat_plugin_buy_cancelled": "Buy order cancelled", "fiat_plugin_buy_complete_title": "Buy Order Complete", "fiat_plugin_buy_complete_message_s": "Your buy order of %1$s %2$s with %3$s %4$s has been completed.", "fiat_plugin_buy_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your wallet.", "fiat_plugin_buy_complete_message_2_hours_s": "Please allow up to %1$s hours for the funds to appear in your wallet.", "fiat_plugin_buy_failed_try_again": "Buy order failed. Please try again", + "fiat_plugin_buy_unknown_status": "Unknown order status upon completion. Please contact support for assistence.", "fiat_plugin_sell_complete_title": "Sell Order Complete", "fiat_plugin_sell_complete_message_s": "Your sell order of %1$s %2$s for %3$s %4$s has been completed.", "fiat_plugin_sell_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your account.", From 2a70c43c4013e8347dec271b7e40d2a9c9af8d0b Mon Sep 17 00:00:00 2001 From: Paul V Puey Date: Mon, 2 Dec 2024 17:01:40 -0800 Subject: [PATCH 42/67] New translations enus.json (Chinese Simplified) --- src/locales/strings/zh.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/locales/strings/zh.json b/src/locales/strings/zh.json index 4a29a0861dc..a001d60aebd 100644 --- a/src/locales/strings/zh.json +++ b/src/locales/strings/zh.json @@ -305,6 +305,9 @@ "request_qr_your_wrapped_segwit_address": "Your Wrapped-Segwit Address", "request_qr_your_legacy_address": "Your Legacy Address", "request_qr_your_segwit_address": "Your Segwit Address", + "request_qr_your_sapling_address": "Your Sapling Address (shielded)", + "request_qr_your_transparent_address": "Your Transparent Address (auto-shielded)", + "request_qr_your_unified_address": "Your Unified Address (shielded)", "request_review_question_title": "Enjoying %1$s?", "request_review_question_subtitle": "Please give us a review", "request_review_answer_no": "No Thanks", @@ -1225,6 +1228,7 @@ "stake_earn_1s": "Earn: %1$s", "stake_earning_1s": "Earning: %1$s", "stake_apy_1s": "%1$s APY", + "stake_stable_apy": "Stable APY", "stake_variable_apy": "Variable APY", "stake_s_staked": "%s Staked", "stake_s_earned": "%s Earned", @@ -1294,11 +1298,13 @@ "fiat_plugin_fetching_assets": "Fetching supported assets", "fiat_plugin_sell_cancelled": "Sell order cancelled", "fiat_plugin_finalizing_quote": "Finalizing your exchange quote. Please wait as this may take up to a minute", + "fiat_plugin_buy_cancelled": "Buy order cancelled", "fiat_plugin_buy_complete_title": "Buy Order Complete", "fiat_plugin_buy_complete_message_s": "Your buy order of %1$s %2$s with %3$s %4$s has been completed.", "fiat_plugin_buy_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your wallet.", "fiat_plugin_buy_complete_message_2_hours_s": "Please allow up to %1$s hours for the funds to appear in your wallet.", "fiat_plugin_buy_failed_try_again": "Buy order failed. Please try again", + "fiat_plugin_buy_unknown_status": "Unknown order status upon completion. Please contact support for assistence.", "fiat_plugin_sell_complete_title": "Sell Order Complete", "fiat_plugin_sell_complete_message_s": "Your sell order of %1$s %2$s for %3$s %4$s has been completed.", "fiat_plugin_sell_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your account.", From d6d3bf0a97a2d658d7d9c6920116012ce2740fdc Mon Sep 17 00:00:00 2001 From: Paul V Puey Date: Mon, 2 Dec 2024 17:01:41 -0800 Subject: [PATCH 43/67] New translations enus.json (Vietnamese) --- src/locales/strings/vi.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/locales/strings/vi.json b/src/locales/strings/vi.json index a466601426d..e4824bcda0e 100644 --- a/src/locales/strings/vi.json +++ b/src/locales/strings/vi.json @@ -305,6 +305,9 @@ "request_qr_your_wrapped_segwit_address": "Your Wrapped-Segwit Address", "request_qr_your_legacy_address": "Your Legacy Address", "request_qr_your_segwit_address": "Your Segwit Address", + "request_qr_your_sapling_address": "Your Sapling Address (shielded)", + "request_qr_your_transparent_address": "Your Transparent Address (auto-shielded)", + "request_qr_your_unified_address": "Your Unified Address (shielded)", "request_review_question_title": "Enjoying %1$s?", "request_review_question_subtitle": "Please give us a review", "request_review_answer_no": "No Thanks", @@ -1225,6 +1228,7 @@ "stake_earn_1s": "Earn: %1$s", "stake_earning_1s": "Earning: %1$s", "stake_apy_1s": "%1$s APY", + "stake_stable_apy": "Stable APY", "stake_variable_apy": "Variable APY", "stake_s_staked": "%s Staked", "stake_s_earned": "%s Earned", @@ -1294,11 +1298,13 @@ "fiat_plugin_fetching_assets": "Fetching supported assets", "fiat_plugin_sell_cancelled": "Sell order cancelled", "fiat_plugin_finalizing_quote": "Finalizing your exchange quote. Please wait as this may take up to a minute", + "fiat_plugin_buy_cancelled": "Buy order cancelled", "fiat_plugin_buy_complete_title": "Buy Order Complete", "fiat_plugin_buy_complete_message_s": "Your buy order of %1$s %2$s with %3$s %4$s has been completed.", "fiat_plugin_buy_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your wallet.", "fiat_plugin_buy_complete_message_2_hours_s": "Please allow up to %1$s hours for the funds to appear in your wallet.", "fiat_plugin_buy_failed_try_again": "Buy order failed. Please try again", + "fiat_plugin_buy_unknown_status": "Unknown order status upon completion. Please contact support for assistence.", "fiat_plugin_sell_complete_title": "Sell Order Complete", "fiat_plugin_sell_complete_message_s": "Your sell order of %1$s %2$s for %3$s %4$s has been completed.", "fiat_plugin_sell_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your account.", From 7e979bec92ba96ce6b310ed69a103bba4de287dc Mon Sep 17 00:00:00 2001 From: Paul V Puey Date: Mon, 2 Dec 2024 17:01:42 -0800 Subject: [PATCH 44/67] New translations enus.json (Spanish, Mexico) --- src/locales/strings/esMX.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/locales/strings/esMX.json b/src/locales/strings/esMX.json index ecb54ca3204..fbc1f74e355 100644 --- a/src/locales/strings/esMX.json +++ b/src/locales/strings/esMX.json @@ -305,6 +305,9 @@ "request_qr_your_wrapped_segwit_address": "Tu dirección Wrapped-Segwit", "request_qr_your_legacy_address": "Tu dirección Legacy", "request_qr_your_segwit_address": "Tu dirección Segwit", + "request_qr_your_sapling_address": "Your Sapling Address (shielded)", + "request_qr_your_transparent_address": "Your Transparent Address (auto-shielded)", + "request_qr_your_unified_address": "Your Unified Address (shielded)", "request_review_question_title": "¿Disfrutando %1$s?", "request_review_question_subtitle": "Por favor, danos una reseña", "request_review_answer_no": "No, gracias", @@ -668,7 +671,7 @@ "transaction_details_fee_warning": "Tarifas de red altas", "transaction_details_swap": "Intercambio de fondos", "transaction_details_swap_network_fee": "Tarifa de red de intercambio", - "transaction_details_swap_order_cancel": "Orden de intercambio cancelada", + "transaction_details_swap_order_cancel": "Swap Order Cancelled", "transaction_details_swap_order_post": "Orden de intercambio abierta", "transaction_details_swap_order_fill": "Orden de intercambio cancelada", "transaction_details_claim": "Reclamar fondos apostados", @@ -1225,6 +1228,7 @@ "stake_earn_1s": "Earn: %1$s", "stake_earning_1s": "Earning: %1$s", "stake_apy_1s": "%1$s APY", + "stake_stable_apy": "Stable APY", "stake_variable_apy": "Variable APY", "stake_s_staked": "%s Staked", "stake_s_earned": "%s Earned", @@ -1294,11 +1298,13 @@ "fiat_plugin_fetching_assets": "Fetching supported assets", "fiat_plugin_sell_cancelled": "Sell order cancelled", "fiat_plugin_finalizing_quote": "Finalizing your exchange quote. Please wait as this may take up to a minute", + "fiat_plugin_buy_cancelled": "Buy order cancelled", "fiat_plugin_buy_complete_title": "Buy Order Complete", "fiat_plugin_buy_complete_message_s": "Your buy order of %1$s %2$s with %3$s %4$s has been completed.", "fiat_plugin_buy_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your wallet.", "fiat_plugin_buy_complete_message_2_hours_s": "Please allow up to %1$s hours for the funds to appear in your wallet.", "fiat_plugin_buy_failed_try_again": "Buy order failed. Please try again", + "fiat_plugin_buy_unknown_status": "Unknown order status upon completion. Please contact support for assistence.", "fiat_plugin_sell_complete_title": "Sell Order Complete", "fiat_plugin_sell_complete_message_s": "Your sell order of %1$s %2$s for %3$s %4$s has been completed.", "fiat_plugin_sell_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your account.", From 8b32153b031cb1dfa1ace89493dc5b60b3341a14 Mon Sep 17 00:00:00 2001 From: Paul V Puey Date: Mon, 2 Dec 2024 17:01:43 -0800 Subject: [PATCH 45/67] New translations enus.json (Karakalpak) --- src/locales/strings/kaa.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/locales/strings/kaa.json b/src/locales/strings/kaa.json index 5f25909f58d..1bbf3d2272d 100644 --- a/src/locales/strings/kaa.json +++ b/src/locales/strings/kaa.json @@ -305,6 +305,9 @@ "request_qr_your_wrapped_segwit_address": "Your Wrapped-Segwit Address", "request_qr_your_legacy_address": "Your Legacy Address", "request_qr_your_segwit_address": "Your Segwit Address", + "request_qr_your_sapling_address": "Your Sapling Address (shielded)", + "request_qr_your_transparent_address": "Your Transparent Address (auto-shielded)", + "request_qr_your_unified_address": "Your Unified Address (shielded)", "request_review_question_title": "Enjoying %1$s?", "request_review_question_subtitle": "Please give us a review", "request_review_answer_no": "Yaq, raxmet", @@ -1225,6 +1228,7 @@ "stake_earn_1s": "Earn: %1$s", "stake_earning_1s": "Earning: %1$s", "stake_apy_1s": "%1$s APY", + "stake_stable_apy": "Stable APY", "stake_variable_apy": "Variable APY", "stake_s_staked": "%s Staked", "stake_s_earned": "%s Earned", @@ -1294,11 +1298,13 @@ "fiat_plugin_fetching_assets": "Fetching supported assets", "fiat_plugin_sell_cancelled": "Sell order cancelled", "fiat_plugin_finalizing_quote": "Finalizing your exchange quote. Please wait as this may take up to a minute", + "fiat_plugin_buy_cancelled": "Buy order cancelled", "fiat_plugin_buy_complete_title": "Buy Order Complete", "fiat_plugin_buy_complete_message_s": "Your buy order of %1$s %2$s with %3$s %4$s has been completed.", "fiat_plugin_buy_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your wallet.", "fiat_plugin_buy_complete_message_2_hours_s": "Please allow up to %1$s hours for the funds to appear in your wallet.", "fiat_plugin_buy_failed_try_again": "Buy order failed. Please try again", + "fiat_plugin_buy_unknown_status": "Unknown order status upon completion. Please contact support for assistence.", "fiat_plugin_sell_complete_title": "Sell Order Complete", "fiat_plugin_sell_complete_message_s": "Your sell order of %1$s %2$s for %3$s %4$s has been completed.", "fiat_plugin_sell_complete_message_2_hour_s": "Please allow up to %1$s hour for the funds to appear in your account.", From 6ec26af42b8aea46e83d31f0707527ebd2ce0016 Mon Sep 17 00:00:00 2001 From: peachbits Date: Mon, 2 Dec 2024 17:08:13 -0800 Subject: [PATCH 46/67] Upgrade privacy deps --- ios/Podfile.lock | 4 ++-- package.json | 4 ++-- yarn.lock | 18 +++++++++--------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 5da18253851..4216f5e7dbf 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -430,7 +430,7 @@ PODS: - react-native-webview (13.8.4): - RCT-Folly (= 2021.07.22.00) - React-Core - - react-native-zcash (0.9.4): + - react-native-zcash (0.9.5): - gRPC-Swift (~> 1.8) - MnemonicSwift (~> 2.2) - React-Core @@ -1141,7 +1141,7 @@ SPEC CHECKSUMS: react-native-safari-view: 955d7160d159241b8e9395d12d10ea0ef863dcdd react-native-safe-area-context: dcab599c527c2d7de2d76507a523d20a0b83823d react-native-webview: fa228e55c53372c2b361d2fa5e415844fa83eabf - react-native-zcash: 722050a75f795ad7edfccf12c81202e42c198c9d + react-native-zcash: b54e07fd36332f8b2fe57e3ae8d76e795e339c9a React-perflogger: 0cc42978a483a47f3696171dac2e7033936fc82d React-RCTActionSheet: ea922b476d24f6d40b8e02ac3228412bd3637468 React-RCTAnimation: 7be2c148398eaa5beac950b2b5ec7102389ec3ad diff --git a/package.json b/package.json index 57e85a8e8b0..8a189e172a6 100644 --- a/package.json +++ b/package.json @@ -142,7 +142,7 @@ "react-native-mymonero-core": "^0.3.1", "react-native-patina": "^0.1.6", "react-native-permissions": "^4.1.5", - "react-native-piratechain": "^0.5.5", + "react-native-piratechain": "^0.5.6", "react-native-reanimated": "^3.14.0", "react-native-reorderable-list": "^0.5.0", "react-native-safari-view": "^2.1.0", @@ -157,7 +157,7 @@ "react-native-vector-icons": "^10.1.0", "react-native-webview": "^13.8.4", "react-native-wheel-picker-android": "^2.0.6", - "react-native-zcash": "^0.9.4", + "react-native-zcash": "^0.9.5", "react-redux": "^8.1.1", "redux": "^4.2.1", "redux-thunk": "^2.3.0", diff --git a/yarn.lock b/yarn.lock index 11fe019539c..2c317c75a2d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16553,10 +16553,10 @@ react-native-permissions@^4.1.5: resolved "https://registry.yarnpkg.com/react-native-permissions/-/react-native-permissions-4.1.5.tgz#db4d1ddbf076570043f4fd4168f54bb6020aec92" integrity sha512-r6VMRacASmtRHS+GZ+5HQCp9p9kiE+UU9magHOZCXZLTJitdTuVHWZRrb4v4oqZGU+zAp3mZhTQftuMMv+WLUg== -react-native-piratechain@^0.5.5: - version "0.5.5" - resolved "https://registry.yarnpkg.com/react-native-piratechain/-/react-native-piratechain-0.5.5.tgz#73ba08a04f45b133184b6efea70a2ed5c5cf5160" - integrity sha512-oMntk1SrUWR9BkQeA22onSU8m6VurtHkpXocQSBiqXhX7ZUG/94rbwPuV/OdfzrhXQRYjD71Vfj31T5qS0wZ1A== +react-native-piratechain@^0.5.6: + version "0.5.6" + resolved "https://registry.yarnpkg.com/react-native-piratechain/-/react-native-piratechain-0.5.6.tgz#24883f3c7093871babf0bc487d6fb0cbefce109d" + integrity sha512-9sTssIhfXJEv6dQUO/jStefBJmqS2K5mLLiJktebUcDe3tYuqntRx502vc7DvDyPJEpP8UNe0y1bNyd1ocE57g== dependencies: rfc4648 "^1.3.0" @@ -16675,12 +16675,12 @@ react-native-wheel-picker-android@^2.0.6: dependencies: moment "^2.22.0" -react-native-zcash@^0.9.4: - version "0.9.4" - resolved "https://registry.yarnpkg.com/react-native-zcash/-/react-native-zcash-0.9.4.tgz#f02f789e3b21548d436cee7633fe321fa4804f7b" - integrity sha512-N6RbuzwshEiZqIdiYbBAcI9+e7MEL8+dhErpJDSMLmbPGYEJAprVUPL/B9HP/lo4PsD5nXv5ll9Q16Zu0J0Uag== +react-native-zcash@^0.9.5: + version "0.9.5" + resolved "https://registry.yarnpkg.com/react-native-zcash/-/react-native-zcash-0.9.5.tgz#38991a9d83641d9c69fba01cdddbb23b5cec73c9" + integrity sha512-yzuDbNvBUgt2sVXtkipzVYBzzvgB/dAUMyjVBBerZe9MQ/Ihm3ivNlJYlnlflAm2PDAWNwQjhrwzZ3oxYYZbnw== dependencies: - biggystring "^4.1.3" + biggystring "^4.2.3" rfc4648 "^1.3.0" react-native@0.71.15: From eea7777b226b8c3f311529de9e689bfed6d5bf16 Mon Sep 17 00:00:00 2001 From: peachbits Date: Mon, 2 Dec 2024 17:32:07 -0800 Subject: [PATCH 47/67] Fix changelog --- CHANGELOG.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b47e10b32c..3aba33275b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,13 @@ ## Unreleased +- added: Venmo GUI plugin via Moonpay. - added: `isBuiltInAsset` param for 'Exchange_Shift_Success' tracking event +- added: Show all Zcash addresses on Request scene +- changed: Support optional Sideshift private key +- changed: Upgrade edge-core-js to v2.21.0 -## 4.17.2 +## 4.17.2 (2024-11-22) - added: "Add Wallet" button to bottom of `WalletListScene` - fixed: (Zcash/Pirate) Fixed android build issues @@ -12,15 +16,14 @@ - fixed: Receive flip input default currency selection - removed: Keyboard autofocus from `WalletListModal` -## 4.17.1 +## 4.17.1 (2024-11-20) - added: (Zcash) Add NU6 support -## 4.18.0 +## 4.18.0 (2024-12-02) - added: Support for LLD & LLM transaction history - added: Close button (X) for `EdgeModals,` specifically if a desktop platform is detected. -- added: Venmo GUI plugin via Moonpay. - changed: Auto-enable required tokens when navigating to `Stake*` scenes - fixed: Incorrect `SwapInput` amounts on `SwapCreateScene` after changing wallet. - fixed: Backing up a light account while on the `FiatPluginEnterAmountScene` retains light account-related quote errors From cbffbe0b70dcc986679425bb667f3c6190923768 Mon Sep 17 00:00:00 2001 From: peachbits Date: Mon, 2 Dec 2024 17:37:18 -0800 Subject: [PATCH 48/67] bump version to v4.19.0 --- CHANGELOG.md | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3aba33275b9..43d4a3332c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.19.0 + - added: Venmo GUI plugin via Moonpay. - added: `isBuiltInAsset` param for 'Exchange_Shift_Success' tracking event - added: Show all Zcash addresses on Request scene diff --git a/package.json b/package.json index 8a189e172a6..ae51c2be782 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "edge-react-gui", - "version": "4.18.0", + "version": "4.19.0", "private": true, "description": "Edge Wallet React GUI", "homepage": "https://edge.app", From 01a14ad9ee4113290348f488b8713e3155f62adf Mon Sep 17 00:00:00 2001 From: peachbits Date: Mon, 2 Dec 2024 17:45:32 -0800 Subject: [PATCH 49/67] more changelog fixes --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43d4a3332c4..c79b3ab248f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,18 +5,18 @@ ## 4.19.0 - added: Venmo GUI plugin via Moonpay. +- added: "Add Wallet" button to bottom of `WalletListScene` - added: `isBuiltInAsset` param for 'Exchange_Shift_Success' tracking event - added: Show all Zcash addresses on Request scene - changed: Support optional Sideshift private key - changed: Upgrade edge-core-js to v2.21.0 +- fixed: Default home/assets scene post-login based on last visited scene +- fixed: Receive flip input default currency selection +- removed: Keyboard autofocus from `WalletListModal` ## 4.17.2 (2024-11-22) -- added: "Add Wallet" button to bottom of `WalletListScene` - fixed: (Zcash/Pirate) Fixed android build issues -- fixed: Default home/assets scene post-login based on last visited scene -- fixed: Receive flip input default currency selection -- removed: Keyboard autofocus from `WalletListModal` ## 4.17.1 (2024-11-20) From 0655e9a8b6c73229058052891d2424a14967869e Mon Sep 17 00:00:00 2001 From: peachbits Date: Mon, 2 Dec 2024 23:09:46 -0800 Subject: [PATCH 50/67] Filter CreateWalletItem list by networkLocation instead of tokenId --- CHANGELOG.md | 1 + .../CreateWalletSelectCryptoScene.test.tsx.snap | 12 ++++++++++++ src/selectors/getCreateWalletList.ts | 17 ++++++++++++----- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c79b3ab248f..897b550114e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - added: Show all Zcash addresses on Request scene - changed: Support optional Sideshift private key - changed: Upgrade edge-core-js to v2.21.0 +- changed: Filter CreateWalletItem list by networkLocation instead of tokenId - fixed: Default home/assets scene post-login based on last visited scene - fixed: Receive flip input default currency selection - removed: Keyboard autofocus from `WalletListModal` diff --git a/src/__tests__/scenes/__snapshots__/CreateWalletSelectCryptoScene.test.tsx.snap b/src/__tests__/scenes/__snapshots__/CreateWalletSelectCryptoScene.test.tsx.snap index 370529d99b1..4dfbd96265c 100644 --- a/src/__tests__/scenes/__snapshots__/CreateWalletSelectCryptoScene.test.tsx.snap +++ b/src/__tests__/scenes/__snapshots__/CreateWalletSelectCryptoScene.test.tsx.snap @@ -633,6 +633,9 @@ exports[`CreateWalletSelectCrypto should render with loading props 1`] = ` "currencyCode": "REP", "displayName": "Augur", "key": "create-ethereum-1985365e9f78359a9b6ad760e32412f4a445e862", + "networkLocation": { + "contractAddress": "0x1985365e9f78359a9B6AD760e32412f4a445E862", + }, "pluginId": "ethereum", "tokenId": "1985365e9f78359a9b6ad760e32412f4a445e862", "type": "create", @@ -644,6 +647,9 @@ exports[`CreateWalletSelectCrypto should render with loading props 1`] = ` "currencyCode": "REPV2", "displayName": "Augur v2", "key": "create-ethereum-221657776846890989a759ba2973e427dff5c9bb", + "networkLocation": { + "contractAddress": "0x221657776846890989a759BA2973e427DfF5C9bB", + }, "pluginId": "ethereum", "tokenId": "221657776846890989a759ba2973e427dff5c9bb", "type": "create", @@ -655,6 +661,9 @@ exports[`CreateWalletSelectCrypto should render with loading props 1`] = ` "currencyCode": "HERC", "displayName": "Hercules", "key": "create-ethereum-2e91e3e54c5788e9fdd6a181497fdcea1de1bcc1", + "networkLocation": { + "contractAddress": "0x2e91E3e54C5788e9FdD6A181497FDcEa1De1bcc1", + }, "pluginId": "ethereum", "tokenId": "2e91e3e54c5788e9fdd6a181497fdcea1de1bcc1", "type": "create", @@ -666,6 +675,9 @@ exports[`CreateWalletSelectCrypto should render with loading props 1`] = ` "currencyCode": "DAI", "displayName": "Dai Stablecoin", "key": "create-ethereum-6b175474e89094c44da98b954eedeac495271d0f", + "networkLocation": { + "contractAddress": "0x6B175474E89094C44Da98b954EedeAC495271d0F", + }, "pluginId": "ethereum", "tokenId": "6b175474e89094c44da98b954eedeac495271d0f", "type": "create", diff --git a/src/selectors/getCreateWalletList.ts b/src/selectors/getCreateWalletList.ts index c19766d8cac..bee3bbbc471 100644 --- a/src/selectors/getCreateWalletList.ts +++ b/src/selectors/getCreateWalletList.ts @@ -20,6 +20,9 @@ export interface WalletCreateItem { // Used for creating wallets: keyOptions?: JsonObject walletType?: string + + // Used for filtering + networkLocation?: JsonObject } export interface MainWalletCreateItem extends WalletCreateItem { @@ -132,7 +135,7 @@ export const getCreateWalletList = (account: EdgeAccount, opts: CreateWalletList const createWalletIds = Object.keys(account.currencyWallets).filter(walletId => account.currencyWallets[walletId].currencyInfo.pluginId === pluginId) for (const tokenId of Object.keys(builtinTokens)) { - const { currencyCode, displayName } = builtinTokens[tokenId] + const { currencyCode, displayName, networkLocation } = builtinTokens[tokenId] // Fix for when the token code and chain code are the same (like EOS/TLOS) if (currencyCode === currencyInfo.currencyCode) continue @@ -142,6 +145,7 @@ export const getCreateWalletList = (account: EdgeAccount, opts: CreateWalletList key: `create-${currencyInfo.pluginId}-${tokenId}`, currencyCode, displayName, + networkLocation, pluginId, tokenId, createWalletIds @@ -169,7 +173,7 @@ export const filterWalletCreateItemListBySearchText = (createWalletList: WalletC const out: WalletCreateItem[] = [] const searchTarget = normalizeForSearch(searchText) for (const item of createWalletList) { - const { currencyCode, displayName, pluginId, tokenId, walletType } = item + const { currencyCode, displayName, networkLocation = {}, pluginId, walletType } = item if (normalizeForSearch(currencyCode).includes(searchTarget) || normalizeForSearch(displayName).includes(searchTarget)) { out.push(item) continue @@ -179,9 +183,12 @@ export const filterWalletCreateItemListBySearchText = (createWalletList: WalletC out.push(item) continue } - // See if the search term contains the tokenId because we don't have contract addresses in scope. The tokenId is, in most cases, close enough to a contract address to be useful. - if (tokenId !== null && normalizeForSearch(searchTarget).includes(normalizeForSearch(tokenId))) { - out.push(item) + // See if the search term can be found in the networkLocation object ie. contractAddress + for (const value of Object.values(networkLocation)) { + if (typeof value === 'string' && normalizeForSearch(value).includes(searchTarget)) { + out.push(item) + break + } } } return out From 8cd1e8fdb4bc0d77f4a909232f9b40e2acf10061 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 4 Dec 2024 11:59:27 -0800 Subject: [PATCH 51/67] Upgrade edge-exchange-plugins to v2.15.1 --- ios/Podfile.lock | 4 ++-- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 4216f5e7dbf..d02fbf63394 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -21,7 +21,7 @@ PODS: - React-Core - edge-currency-plugins (3.4.4): - React-Core - - edge-exchange-plugins (2.15.0): + - edge-exchange-plugins (2.15.1): - React-Core - edge-login-ui-rn (3.24.0): - React-Core @@ -1083,7 +1083,7 @@ SPEC CHECKSUMS: edge-core-js: 10f2bb3facfd5c5dced56cefcda54c90f82799b6 edge-currency-accountbased: b4c3f2414bcb2bb543084859ec2d7b819f6faf91 edge-currency-plugins: 95577a282061148263207fad9befe11bb07a57c1 - edge-exchange-plugins: c5d15492601cda268ec9f26eafc188f8bb8b9450 + edge-exchange-plugins: fd725d2fbe76ea0cc8eba1711c565f401cfb6c1b edge-login-ui-rn: 70f8057108ae213e43583a0b3876c88c500c27bc EXApplication: d8f53a7eee90a870a75656280e8d4b85726ea903 EXConstants: f348da07e21b23d2b085e270d7b74f282df1a7d9 diff --git a/package.json b/package.json index ae51c2be782..7d33bfc9c2b 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ "edge-currency-accountbased": "^4.29.0", "edge-currency-monero": "^1.3.2", "edge-currency-plugins": "^3.4.4", - "edge-exchange-plugins": "^2.15.0", + "edge-exchange-plugins": "^2.15.1", "edge-info-server": "^3.0.1", "edge-login-ui-rn": "^3.24.0", "ethers": "^5.7.2", diff --git a/yarn.lock b/yarn.lock index 2c317c75a2d..e5ee3b765ed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9417,10 +9417,10 @@ edge-currency-plugins@^3.4.4: wifgrs "^2.0.6" ws "^7.4.6" -edge-exchange-plugins@^2.15.0: - version "2.15.0" - resolved "https://registry.yarnpkg.com/edge-exchange-plugins/-/edge-exchange-plugins-2.15.0.tgz#e222fb160e9ff0680b5b8e570233b72506c0979a" - integrity sha512-z6PiEI3eUS/2oOb/lH/07LM1BosZRjAV11pWDun403wW6xkBMApPNPf2ks93ksuJk5tTLNU+tKJLBI06f2NP5w== +edge-exchange-plugins@^2.15.1: + version "2.15.1" + resolved "https://registry.yarnpkg.com/edge-exchange-plugins/-/edge-exchange-plugins-2.15.1.tgz#cbcd047cfaf81b9cc456f25dbc85d81babe0dece" + integrity sha512-9iRJLSSQQ836RpvRrsDF/9o6Y05twAcfad331txaeu5MIYCDSogzg0iAZILcdXBks/Zvu19kMWGhgBTer3aQyA== dependencies: "@cosmjs/encoding" "^0.32.2" biggystring "^4.2.3" From 4562a045d50ec4bb10107cfe513a593eb3d82de9 Mon Sep 17 00:00:00 2001 From: peachbits Date: Wed, 4 Dec 2024 12:17:51 -0800 Subject: [PATCH 52/67] Upgrade edge-currency-accountbased to v4.31.0 --- ios/Podfile.lock | 4 ++-- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index d02fbf63394..bb46b7b510c 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -17,7 +17,7 @@ PODS: - DoubleConversion (1.1.6) - edge-core-js (2.21.0): - React-Core - - edge-currency-accountbased (4.29.0): + - edge-currency-accountbased (4.31.0): - React-Core - edge-currency-plugins (3.4.4): - React-Core @@ -1081,7 +1081,7 @@ SPEC CHECKSUMS: disklet: e7ed3e673ccad9d175a1675f9f3589ffbf69a5fd DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 edge-core-js: 10f2bb3facfd5c5dced56cefcda54c90f82799b6 - edge-currency-accountbased: b4c3f2414bcb2bb543084859ec2d7b819f6faf91 + edge-currency-accountbased: 6ee09ac36058033eefcc154239c40aa8a19bc065 edge-currency-plugins: 95577a282061148263207fad9befe11bb07a57c1 edge-exchange-plugins: fd725d2fbe76ea0cc8eba1711c565f401cfb6c1b edge-login-ui-rn: 70f8057108ae213e43583a0b3876c88c500c27bc diff --git a/package.json b/package.json index 7d33bfc9c2b..e5ef4d75165 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "detect-bundler": "^1.1.0", "disklet": "^0.5.2", "edge-core-js": "^2.21.0", - "edge-currency-accountbased": "^4.29.0", + "edge-currency-accountbased": "^4.31.0", "edge-currency-monero": "^1.3.2", "edge-currency-plugins": "^3.4.4", "edge-exchange-plugins": "^2.15.1", diff --git a/yarn.lock b/yarn.lock index e5ee3b765ed..66aeb2ffdef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9324,10 +9324,10 @@ edge-core-js@^2.21.0: yaob "^0.3.12" yavent "^0.1.3" -edge-currency-accountbased@^4.29.0: - version "4.29.0" - resolved "https://registry.yarnpkg.com/edge-currency-accountbased/-/edge-currency-accountbased-4.29.0.tgz#5cb5bc2fdfcf2ac4480a881e84a656723b62a52e" - integrity sha512-ORGLJeIUh/F153gUsGQ5Eh4xd37R0F9HmH2s6CCL9nmjF6pMXvdxzwHyB6xhXpgSHtm9Wa9qz5R8jYCJ/K5Png== +edge-currency-accountbased@^4.31.0: + version "4.31.0" + resolved "https://registry.yarnpkg.com/edge-currency-accountbased/-/edge-currency-accountbased-4.31.0.tgz#f57e4dc12718f1dc2449fb3e8f04d4152d434652" + integrity sha512-l1yIpQZ3eh7OLUwzisvdWup7vIvcmj/gbPcDBnlHMsNXEtzfFcZhcZxCxcU7/FR18WqOgOpO14R1TSoyQTWSDA== dependencies: "@binance-chain/javascript-sdk" "^4.2.0" "@chain-registry/client" "^1.15.0" From 6538b4bfc1bee5371e385b3348fe9993eb5c27d2 Mon Sep 17 00:00:00 2001 From: peachbits Date: Tue, 3 Dec 2024 16:49:51 -0800 Subject: [PATCH 53/67] Add Helius to Solana env config --- src/envConfig.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/envConfig.ts b/src/envConfig.ts index 2c7072815f4..3a208bd8b6f 100644 --- a/src/envConfig.ts +++ b/src/envConfig.ts @@ -268,6 +268,7 @@ export const asEnvConfig = asObject({ SOLANA_INIT: asCorePluginInit( asObject({ alchemyApiKey: asOptional(asString, ''), + heliusApiKey: asOptional(asString), poktPortalApiKey: asOptional(asString, '') }).withRest ), From 004cc7c687940b9bd4b463454397ae53a1c9a805 Mon Sep 17 00:00:00 2001 From: Sam Holmes Date: Wed, 4 Dec 2024 14:20:06 -0800 Subject: [PATCH 54/67] Sort Venmo plugin above Paypal --- .../__snapshots__/GuiPlugins.test.ts.snap | 40 +++++++++---------- src/constants/plugins/buyPluginList.json | 2 +- src/constants/plugins/sellPluginList.json | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/__tests__/__snapshots__/GuiPlugins.test.ts.snap b/src/__tests__/__snapshots__/GuiPlugins.test.ts.snap index c81a2ae1e6c..29fcf36642d 100644 --- a/src/__tests__/__snapshots__/GuiPlugins.test.ts.snap +++ b/src/__tests__/__snapshots__/GuiPlugins.test.ts.snap @@ -201,13 +201,13 @@ Limit $1000", "deepQuery": {}, "description": "Fee: ~5% Settlement: 5 min - 24 hours", - "paymentType": "paypal", - "paymentTypeLogoKey": "paypal", + "paymentType": "venmo", + "paymentTypeLogoKey": "venmo", "paymentTypes": [ - "paypal", + "venmo", ], - "pluginId": "paypal", - "title": "Paypal", + "pluginId": "venmo", + "title": "Venmo", }, { "cryptoCodes": [], @@ -215,13 +215,13 @@ Settlement: 5 min - 24 hours", "deepQuery": {}, "description": "Fee: ~5% Settlement: 5 min - 24 hours", - "paymentType": "venmo", - "paymentTypeLogoKey": "venmo", + "paymentType": "paypal", + "paymentTypeLogoKey": "paypal", "paymentTypes": [ - "venmo", + "paypal", ], - "pluginId": "venmo", - "title": "Venmo", + "pluginId": "paypal", + "title": "Paypal", }, { "cryptoCodes": [], @@ -323,13 +323,13 @@ Settlement: 2 - 3 days", "deepQuery": {}, "description": "Fee: ~5% Settlement: 5 min - 24 hours", - "paymentType": "paypal", - "paymentTypeLogoKey": "paypal", + "paymentType": "venmo", + "paymentTypeLogoKey": "venmo", "paymentTypes": [ - "paypal", + "venmo", ], - "pluginId": "paypal", - "title": "Paypal", + "pluginId": "venmo", + "title": "Venmo", }, { "cryptoCodes": [], @@ -337,13 +337,13 @@ Settlement: 5 min - 24 hours", "deepQuery": {}, "description": "Fee: ~5% Settlement: 5 min - 24 hours", - "paymentType": "venmo", - "paymentTypeLogoKey": "venmo", + "paymentType": "paypal", + "paymentTypeLogoKey": "paypal", "paymentTypes": [ - "venmo", + "paypal", ], - "pluginId": "venmo", - "title": "Venmo", + "pluginId": "paypal", + "title": "Paypal", }, { "cryptoCodes": [], diff --git a/src/constants/plugins/buyPluginList.json b/src/constants/plugins/buyPluginList.json index 2e60986f5c1..e628b2857fc 100644 --- a/src/constants/plugins/buyPluginList.json +++ b/src/constants/plugins/buyPluginList.json @@ -320,7 +320,7 @@ }, { "id": "venmo", - "sortIndex": 15 + "sortIndex": 10 }, { "id": "wire", diff --git a/src/constants/plugins/sellPluginList.json b/src/constants/plugins/sellPluginList.json index ff8636f8a0e..4ea7a153b47 100644 --- a/src/constants/plugins/sellPluginList.json +++ b/src/constants/plugins/sellPluginList.json @@ -333,7 +333,7 @@ }, { "id": "venmo", - "sortIndex": 15 + "sortIndex": 10 }, "----- iOS specifics -----", "----- Country Specifics -----" From 249196f88ab9bd29b24fc6a337cceb2d2b4203ef Mon Sep 17 00:00:00 2001 From: peachbits Date: Tue, 3 Dec 2024 23:24:18 -0800 Subject: [PATCH 55/67] Update Ripple base reserve text strings --- CHANGELOG.md | 1 + src/constants/WalletAndCurrencyConstants.ts | 8 ++++---- src/locales/en_US.ts | 8 ++++---- src/locales/strings/enUS.json | 6 +++--- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 897b550114e..c330603292c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - changed: Support optional Sideshift private key - changed: Upgrade edge-core-js to v2.21.0 - changed: Filter CreateWalletItem list by networkLocation instead of tokenId +- changed: Update Ripple base reserve text strings - fixed: Default home/assets scene post-login based on last visited scene - fixed: Receive flip input default currency selection - removed: Keyboard autofocus from `WalletListModal` diff --git a/src/constants/WalletAndCurrencyConstants.ts b/src/constants/WalletAndCurrencyConstants.ts index 71b26fac48e..e6f1d9e40a6 100644 --- a/src/constants/WalletAndCurrencyConstants.ts +++ b/src/constants/WalletAndCurrencyConstants.ts @@ -277,12 +277,12 @@ export const SPECIAL_CURRENCY_INFO: { chainCode: 'XRP', dummyPublicAddress: 'rfuESo7eHUnvebxgaFjfYxfwXhM2uBPAj3', minimumPopupModals: { - minimumNativeBalance: '10000000', - modalMessage: lstrings.request_xrp_minimum_notification_body, - alertMessage: lstrings.request_xrp_minimum_notification_alert_body + minimumNativeBalance: '1000000', + modalMessage: lstrings.request_xrp_minimum_notification_body_1xrp, + alertMessage: lstrings.request_xrp_minimum_notification_alert_body_1xrp }, displayBuyCrypto: false, - tokenActivationAdditionalReserveText: lstrings.activate_wallet_token_scene_body_xrp_extra, + tokenActivationAdditionalReserveText: lstrings.activate_wallet_token_scene_body_xrp_extra_point2xrp, isImportKeySupported: true, unstoppableDomainsTicker: 'XRP' }, diff --git a/src/locales/en_US.ts b/src/locales/en_US.ts index c1ab3a2ae7f..1cbb6c033d2 100644 --- a/src/locales/en_US.ts +++ b/src/locales/en_US.ts @@ -179,9 +179,9 @@ const strings = { fragment_request_address_uri_copied: 'Request address URI copied to clipboard', fragment_copied: 'Successfully copied to clipboard', request_minimum_notification_title: 'Minimum Balance Required', - request_xrp_minimum_notification_body: - 'Ripple (XRP) wallets require a 10 XRP minimum balance. You must deposit at least 10 XRP to this address before this wallet will show a balance or transactions. 10 XRP will be unspendable for the lifetime of this wallet address.', - request_xrp_minimum_notification_alert_body: 'This wallet will always require a 10 XRP minimum', + request_xrp_minimum_notification_body_1xrp: + 'Ripple (XRP) wallets require a 1 XRP minimum balance. You must deposit at least 1 XRP to this address before this wallet will show a balance or transactions. 1 XRP will be unspendable for the lifetime of this wallet address.', + request_xrp_minimum_notification_alert_body_1xrp: 'This wallet will always require a 1 XRP minimum', request_xlm_minimum_notification_body: 'Stellar (XLM) wallets require a 1 XLM minimum balance. You must deposit at least 1 XLM to this address before this wallet will show a balance or transactions. 1 XLM will be unspendable for the lifetime of this wallet address.', request_xlm_minimum_notification_alert_body: 'This wallet will always require a 1 XLM minimum', @@ -324,7 +324,7 @@ const strings = { activate_wallet_tokens_scene_tile_title: 'Tokens to Activate', activate_wallet_token_scene_body: 'To send and receive the selected token you will first need to activate it with a blockchain transaction. This transaction will cost the following fee.\n\nPlease confirm using the slider below.', - activate_wallet_token_scene_body_xrp_extra: 'Token activation will increase the XRP reserve requirement by 2 XRP per token activated.', + activate_wallet_token_scene_body_xrp_extra_point2xrp: 'Token activation will increase the XRP reserve requirement by 0.2 XRP per token activated.', activate_wallet_token_scene_body_algo_extra: 'Token activation will increase the ALGO reserve requirement by 0.1 ALGO per token activated.', activate_wallet_tokens_scene_body: 'To send and receive the selected tokens you will first need to activate them with one or more blockchain transactions. The transactions in total will cost the following fee shown below. Please confirm using the slider below.', diff --git a/src/locales/strings/enUS.json b/src/locales/strings/enUS.json index b24ed81c0c1..b0ba77048ef 100644 --- a/src/locales/strings/enUS.json +++ b/src/locales/strings/enUS.json @@ -128,8 +128,8 @@ "fragment_request_address_uri_copied": "Request address URI copied to clipboard", "fragment_copied": "Successfully copied to clipboard", "request_minimum_notification_title": "Minimum Balance Required", - "request_xrp_minimum_notification_body": "Ripple (XRP) wallets require a 10 XRP minimum balance. You must deposit at least 10 XRP to this address before this wallet will show a balance or transactions. 10 XRP will be unspendable for the lifetime of this wallet address.", - "request_xrp_minimum_notification_alert_body": "This wallet will always require a 10 XRP minimum", + "request_xrp_minimum_notification_body_1xrp": "Ripple (XRP) wallets require a 1 XRP minimum balance. You must deposit at least 1 XRP to this address before this wallet will show a balance or transactions. 1 XRP will be unspendable for the lifetime of this wallet address.", + "request_xrp_minimum_notification_alert_body_1xrp": "This wallet will always require a 1 XRP minimum", "request_xlm_minimum_notification_body": "Stellar (XLM) wallets require a 1 XLM minimum balance. You must deposit at least 1 XLM to this address before this wallet will show a balance or transactions. 1 XLM will be unspendable for the lifetime of this wallet address.", "request_xlm_minimum_notification_alert_body": "This wallet will always require a 1 XLM minimum", "request_dot_minimum_notification_body": "Polkadot (DOT) wallets require a 1 DOT minimum balance. You must deposit at least 1 DOT to this address before this wallet will show a balance or transactions. 1 DOT will be unspendable for the lifetime of this wallet address.", @@ -263,7 +263,7 @@ "activate_wallet_token_scene_tile_title": "Token to Activate", "activate_wallet_tokens_scene_tile_title": "Tokens to Activate", "activate_wallet_token_scene_body": "To send and receive the selected token you will first need to activate it with a blockchain transaction. This transaction will cost the following fee.\n\nPlease confirm using the slider below.", - "activate_wallet_token_scene_body_xrp_extra": "Token activation will increase the XRP reserve requirement by 2 XRP per token activated.", + "activate_wallet_token_scene_body_xrp_extra_point2xrp": "Token activation will increase the XRP reserve requirement by 0.2 XRP per token activated.", "activate_wallet_token_scene_body_algo_extra": "Token activation will increase the ALGO reserve requirement by 0.1 ALGO per token activated.", "activate_wallet_tokens_scene_body": "To send and receive the selected tokens you will first need to activate them with one or more blockchain transactions. The transactions in total will cost the following fee shown below. Please confirm using the slider below.", "activate_wallet_token_insufficient_funds_s": "You have insufficient funds to activate this token. You need at least %s to proceed with activation.", From 099eeca68323433a7e8b62eff664d92f0ce2e0c5 Mon Sep 17 00:00:00 2001 From: peachbits Date: Thu, 5 Dec 2024 15:22:12 -0800 Subject: [PATCH 56/67] Set fiat balances to 0 in TransactionListTop and FiatText for keysOnlyMode plugins --- src/components/text/FiatText.tsx | 3 ++- src/components/themed/TransactionListTop.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/text/FiatText.tsx b/src/components/text/FiatText.tsx index 921939654c8..3b8ad463c40 100644 --- a/src/components/text/FiatText.tsx +++ b/src/components/text/FiatText.tsx @@ -3,6 +3,7 @@ import * as React from 'react' import { useFiatText } from '../../hooks/useFiatText' import { useTokenDisplayData } from '../../hooks/useTokenDisplayData' +import { isKeysOnlyPlugin } from '../../util/CurrencyInfoHelpers' interface Props { // Display options: @@ -53,7 +54,7 @@ export const FiatText = ({ isoFiatCurrencyCode, maxPrecision, minPrecision, - nativeCryptoAmount, + nativeCryptoAmount: isKeysOnlyPlugin(wallet.currencyInfo.pluginId) ? '0' : nativeCryptoAmount, subCentTruncation, hideBalance }) diff --git a/src/components/themed/TransactionListTop.tsx b/src/components/themed/TransactionListTop.tsx index 66a3000d0d0..5d63a5548f8 100644 --- a/src/components/themed/TransactionListTop.tsx +++ b/src/components/themed/TransactionListTop.tsx @@ -30,6 +30,7 @@ import { useDispatch, useSelector } from '../../types/reactRedux' import { NavigationBase, WalletsTabSceneProps } from '../../types/routerTypes' import { GuiExchangeRates } from '../../types/types' import { CryptoAmount } from '../../util/CryptoAmount' +import { isKeysOnlyPlugin } from '../../util/CurrencyInfoHelpers' import { triggerHaptic } from '../../util/haptic' import { getFioStakingBalances, getPluginFromPolicy, getPositionAllocations } from '../../util/stakeUtils' import { getUkCompliantString } from '../../util/ukComplianceUtils' @@ -841,7 +842,7 @@ export function TransactionListTop(props: OwnProps) { defaultFiat={defaultFiat} displayDenomination={displayDenomination} exchangeDenomination={exchangeDenomination} - exchangeRate={exchangeRate} + exchangeRate={isKeysOnlyPlugin(wallet.currencyInfo.pluginId) ? '0' : exchangeRate} isAccountBalanceVisible={isAccountBalanceVisible} exchangeRates={exchangeRates} toggleBalanceVisibility={handleBalanceVisibility} From b6a8988ea382d4a12b55710459b96ad2a03def1f Mon Sep 17 00:00:00 2001 From: peachbits Date: Thu, 5 Dec 2024 12:12:10 -0800 Subject: [PATCH 57/67] Deprecate Binance Beacon Chain --- CHANGELOG.md | 1 + src/constants/WalletAndCurrencyConstants.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c330603292c..4801c18b378 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - changed: Upgrade edge-core-js to v2.21.0 - changed: Filter CreateWalletItem list by networkLocation instead of tokenId - changed: Update Ripple base reserve text strings +- changed: Enable `keysOnlyMode` for Binance Beacon Chain - fixed: Default home/assets scene post-login based on last visited scene - fixed: Receive flip input default currency selection - removed: Keyboard autofocus from `WalletListModal` diff --git a/src/constants/WalletAndCurrencyConstants.ts b/src/constants/WalletAndCurrencyConstants.ts index e6f1d9e40a6..4dd49cc3551 100644 --- a/src/constants/WalletAndCurrencyConstants.ts +++ b/src/constants/WalletAndCurrencyConstants.ts @@ -551,6 +551,7 @@ export const SPECIAL_CURRENCY_INFO: { initWalletName: lstrings.string_first_bnb_wallet_name, chainCode: 'BNB', isImportKeySupported: true, + keysOnlyMode: true, dummyPublicAddress: 'bnb1rt449yu7us6hmk4pmyr8talc60ydkwp4qkvcl7' }, binancesmartchain: { From 4bbb136ab844dbed89a4c10cd451d9ab6f2c62c2 Mon Sep 17 00:00:00 2001 From: peachbits Date: Wed, 4 Dec 2024 14:48:01 -0800 Subject: [PATCH 58/67] Fix currencyWallets reference in WalletListScene --- src/components/scenes/WalletListScene.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/scenes/WalletListScene.tsx b/src/components/scenes/WalletListScene.tsx index bcdf2da0278..790080ea9e7 100644 --- a/src/components/scenes/WalletListScene.tsx +++ b/src/components/scenes/WalletListScene.tsx @@ -40,6 +40,7 @@ export function WalletListScene(props: Props) { const sortOption = useSelector(state => state.ui.settings.walletsSort) const account = useSelector(state => state.core.account) + const currencyWallets = useWatch(account, 'currencyWallets') const allKeys = useWatch(account, 'allKeys') const hasRestoreWallets = allKeys.filter(key => key.archived || key.deleted).length > 0 @@ -92,13 +93,13 @@ export function WalletListScene(props: Props) { const tokenSupportingWalletIds = React.useMemo(() => { const walletIds: string[] = [] - for (const wallet of Object.values(account.currencyWallets)) { + for (const wallet of Object.values(currencyWallets)) { if (Object.keys(wallet.currencyConfig.builtinTokens).length > 0) { walletIds.push(wallet.id) } } return walletIds - }, [account]) + }, [currencyWallets]) const handlePressAddEditToken = useHandler(async () => { const walletListResult = await Airship.show(bridge => ( From c7944cb1c2df45a140457999fd2aec1bee37b81a Mon Sep 17 00:00:00 2001 From: peachbits Date: Thu, 5 Dec 2024 18:32:01 -0800 Subject: [PATCH 59/67] Always show Add Wallet button at bottom of asset list --- CHANGELOG.md | 2 ++ src/components/scenes/WalletListScene.tsx | 26 +++++++++++++++-------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4801c18b378..88491459bde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- changed: Always show Add Wallet button at bottom of asset list + ## 4.19.0 - added: Venmo GUI plugin via Moonpay. diff --git a/src/components/scenes/WalletListScene.tsx b/src/components/scenes/WalletListScene.tsx index 790080ea9e7..a2c7acaa395 100644 --- a/src/components/scenes/WalletListScene.tsx +++ b/src/components/scenes/WalletListScene.tsx @@ -132,15 +132,23 @@ export function WalletListScene(props: Props) { const renderListFooter = React.useMemo(() => { if (isSearching && tokenSupportingWalletIds.length > 0) { - return + return ( + + ) } - return ( - - ) - }, [isSearching, tokenSupportingWalletIds.length, handlePressAddWallets, handlePressRestoreWallets, handlePressAddEditToken]) + if (!isSearching && hasRestoreWallets) { + return ( + + ) + } + return + }, [isSearching, tokenSupportingWalletIds.length, hasRestoreWallets, handlePressAddWallets, handlePressAddEditToken, handlePressRestoreWallets]) const renderFooter: FooterRender = React.useCallback( sceneWrapperInfo => { @@ -189,7 +197,7 @@ export function WalletListScene(props: Props) { Date: Wed, 4 Dec 2024 15:10:30 -0800 Subject: [PATCH 60/67] Use chain icon for staking cards --- CHANGELOG.md | 1 + src/util/stakeUtils.ts | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88491459bde..66f3ee579b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased - changed: Always show Add Wallet button at bottom of asset list +- changed: Use chain icon for staking cards ## 4.19.0 diff --git a/src/util/stakeUtils.ts b/src/util/stakeUtils.ts index 852d802ff0e..ec12ff42eed 100644 --- a/src/util/stakeUtils.ts +++ b/src/util/stakeUtils.ts @@ -2,6 +2,7 @@ import { add } from 'biggystring' import { EdgeAccount, EdgeCurrencyInfo, EdgeCurrencyWallet, EdgeStakingStatus, EdgeTokenId } from 'edge-core-js' import { sprintf } from 'sprintf-js' +import { SPECIAL_CURRENCY_INFO } from '../constants/WalletAndCurrencyConstants' import { formatTimeDate } from '../locales/intl' import { lstrings } from '../locales/strings' import { PositionAllocation, StakePlugin, StakePolicy, StakePolicyFilter, StakePosition } from '../plugins/stake-plugins/types' @@ -84,8 +85,12 @@ export const getPolicyIconUris = ( (rewardAssetName, i) => stakePolicy.rewardAssets[i].cdnName ?? metaTokens.find(metaToken => metaToken.currencyCode === rewardAssetName)?.contractAddress ) - const stakeAssetUris = stakeContractAddresses.map(stakeContractAddress => getCurrencyIconUris(pluginId, stakeContractAddress ?? null).symbolImage) - const rewardAssetUris = rewardContractAddresses.map(rewardContractAddress => getCurrencyIconUris(pluginId, rewardContractAddress ?? null).symbolImage) + const stakeAssetUris = stakeContractAddresses.map( + stakeContractAddress => getCurrencyIconUris(pluginId, stakeContractAddress ?? null, SPECIAL_CURRENCY_INFO[pluginId]?.chainIcon ?? false).symbolImage + ) + const rewardAssetUris = rewardContractAddresses.map( + rewardContractAddress => getCurrencyIconUris(pluginId, rewardContractAddress ?? null, SPECIAL_CURRENCY_INFO[pluginId]?.chainIcon ?? false).symbolImage + ) return { stakeAssetUris, rewardAssetUris } } From 3dd7dfb6b77511edb44eeee76de3d99f964ff0ef Mon Sep 17 00:00:00 2001 From: peachbits Date: Thu, 5 Dec 2024 18:34:25 -0800 Subject: [PATCH 61/67] Fix changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66f3ee579b5..88be98811d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ - changed: Filter CreateWalletItem list by networkLocation instead of tokenId - changed: Update Ripple base reserve text strings - changed: Enable `keysOnlyMode` for Binance Beacon Chain +- changed: Always show Add Wallet button at bottom of asset list +- changed: Use chain icon for staking cards - fixed: Default home/assets scene post-login based on last visited scene - fixed: Receive flip input default currency selection - removed: Keyboard autofocus from `WalletListModal` From 3485655487d23ae43f318770a42133c7f200ffe4 Mon Sep 17 00:00:00 2001 From: Sam Holmes Date: Fri, 6 Dec 2024 17:09:53 -0800 Subject: [PATCH 62/67] Upgrade edge-currency-accountbased@^4.31.1 --- ios/Podfile.lock | 4 ++-- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index bb46b7b510c..483b6dd6c6e 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -17,7 +17,7 @@ PODS: - DoubleConversion (1.1.6) - edge-core-js (2.21.0): - React-Core - - edge-currency-accountbased (4.31.0): + - edge-currency-accountbased (4.31.1): - React-Core - edge-currency-plugins (3.4.4): - React-Core @@ -1081,7 +1081,7 @@ SPEC CHECKSUMS: disklet: e7ed3e673ccad9d175a1675f9f3589ffbf69a5fd DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 edge-core-js: 10f2bb3facfd5c5dced56cefcda54c90f82799b6 - edge-currency-accountbased: 6ee09ac36058033eefcc154239c40aa8a19bc065 + edge-currency-accountbased: 2366c3bcdc1af5726c6577830b60df221714e2fd edge-currency-plugins: 95577a282061148263207fad9befe11bb07a57c1 edge-exchange-plugins: fd725d2fbe76ea0cc8eba1711c565f401cfb6c1b edge-login-ui-rn: 70f8057108ae213e43583a0b3876c88c500c27bc diff --git a/package.json b/package.json index e5ef4d75165..7d697155540 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "detect-bundler": "^1.1.0", "disklet": "^0.5.2", "edge-core-js": "^2.21.0", - "edge-currency-accountbased": "^4.31.0", + "edge-currency-accountbased": "^4.31.1", "edge-currency-monero": "^1.3.2", "edge-currency-plugins": "^3.4.4", "edge-exchange-plugins": "^2.15.1", diff --git a/yarn.lock b/yarn.lock index 66aeb2ffdef..783294cf8b1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9324,10 +9324,10 @@ edge-core-js@^2.21.0: yaob "^0.3.12" yavent "^0.1.3" -edge-currency-accountbased@^4.31.0: - version "4.31.0" - resolved "https://registry.yarnpkg.com/edge-currency-accountbased/-/edge-currency-accountbased-4.31.0.tgz#f57e4dc12718f1dc2449fb3e8f04d4152d434652" - integrity sha512-l1yIpQZ3eh7OLUwzisvdWup7vIvcmj/gbPcDBnlHMsNXEtzfFcZhcZxCxcU7/FR18WqOgOpO14R1TSoyQTWSDA== +edge-currency-accountbased@^4.31.1: + version "4.31.1" + resolved "https://registry.yarnpkg.com/edge-currency-accountbased/-/edge-currency-accountbased-4.31.1.tgz#c97ebb0361f2b1eed7f0c4425e7935f5eddd8fa9" + integrity sha512-AexA0y6nQI10X27J+nBxWo988/tbx9aBr5PhdRxRxhQsop3TyzqgiljxHJDxk7ccYC80zdXnj0BQ6mLxcLn0BA== dependencies: "@binance-chain/javascript-sdk" "^4.2.0" "@chain-registry/client" "^1.15.0" From 6685799c1fc6261f0ed6ae76747f8862fd80d056 Mon Sep 17 00:00:00 2001 From: Sam Holmes Date: Mon, 9 Dec 2024 13:01:09 -0800 Subject: [PATCH 63/67] Add Venmo icon to Venmo GUI plugin --- .../paymentTypes/paymentTypeLogoVenmo.png | Bin 0 -> 40014 bytes src/components/scenes/GuiPluginListScene.tsx | 2 +- src/theme/variables/edgeDark.ts | 2 ++ src/theme/variables/edgeLight.ts | 2 ++ src/theme/variables/testDark.ts | 2 ++ src/theme/variables/testLight.ts | 2 ++ src/types/Theme.ts | 1 + 7 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 src/assets/images/paymentTypes/paymentTypeLogoVenmo.png diff --git a/src/assets/images/paymentTypes/paymentTypeLogoVenmo.png b/src/assets/images/paymentTypes/paymentTypeLogoVenmo.png new file mode 100644 index 0000000000000000000000000000000000000000..a0df0059091bebb85f3990f1ac4e9aa3da3f0583 GIT binary patch literal 40014 zcmeFa2XvIx);Io4NGPG3NDl;1+7PCGBbiOz4tzpM7&57(5v(o8wd(W z6HuBM0jWWdCI}KKDu@v&Qj-6EW)eUH_ugE1|KGRP_hv1|$((cc`JLVOeon?IG6}D3 zdbe~0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@ek;S~ z(_S?liOcqP4eX4Am|@GHv_5$zxG(PJmDt=VWT#2IT}i8tM&3VsPv4% z{a%$UTvkVtV*&hlO~9s*PhgG-sVy(C)BJFzoUqmxjwCtaW4Z1b%Rn(*1d^#Od1GC^CFoSV4(0^XkZaD#qdK2$xNW;y~vKqa)i ze-!8jIKZx2oC3!R7Jsg6@PW8`4(zH0%y)!pGu_TNAaFOpC*L10-3-!FEATBXUTZMY zNJrE@G@AIQdJO(@E!r+}FEKN^@v6sJTBq42!1p@yHZV4s@pkGZ=9psM1X(N0yFt0rlNUhoQQ`13M&nWyqM8MclxLmebt#JuT{H zsY^OHgoQvv__YrR=Yvc|zKIu0`Jazv|4%<1=1&xiEmtS_qyECvwtSxkA(8NgfByPs u5B{zn6ee6Y#BLSP{} Date: Wed, 11 Dec 2024 15:23:46 -0800 Subject: [PATCH 64/67] Upgrade edge-currency-accountbased@^4.31.2 --- ios/Podfile.lock | 4 ++-- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 483b6dd6c6e..6496aebda7a 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -17,7 +17,7 @@ PODS: - DoubleConversion (1.1.6) - edge-core-js (2.21.0): - React-Core - - edge-currency-accountbased (4.31.1): + - edge-currency-accountbased (4.31.2): - React-Core - edge-currency-plugins (3.4.4): - React-Core @@ -1081,7 +1081,7 @@ SPEC CHECKSUMS: disklet: e7ed3e673ccad9d175a1675f9f3589ffbf69a5fd DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 edge-core-js: 10f2bb3facfd5c5dced56cefcda54c90f82799b6 - edge-currency-accountbased: 2366c3bcdc1af5726c6577830b60df221714e2fd + edge-currency-accountbased: db237a8deb41237dabae726387926698445d23e0 edge-currency-plugins: 95577a282061148263207fad9befe11bb07a57c1 edge-exchange-plugins: fd725d2fbe76ea0cc8eba1711c565f401cfb6c1b edge-login-ui-rn: 70f8057108ae213e43583a0b3876c88c500c27bc diff --git a/package.json b/package.json index 7d697155540..80119b5d37d 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "detect-bundler": "^1.1.0", "disklet": "^0.5.2", "edge-core-js": "^2.21.0", - "edge-currency-accountbased": "^4.31.1", + "edge-currency-accountbased": "^4.31.2", "edge-currency-monero": "^1.3.2", "edge-currency-plugins": "^3.4.4", "edge-exchange-plugins": "^2.15.1", diff --git a/yarn.lock b/yarn.lock index 783294cf8b1..10f379bd472 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9324,10 +9324,10 @@ edge-core-js@^2.21.0: yaob "^0.3.12" yavent "^0.1.3" -edge-currency-accountbased@^4.31.1: - version "4.31.1" - resolved "https://registry.yarnpkg.com/edge-currency-accountbased/-/edge-currency-accountbased-4.31.1.tgz#c97ebb0361f2b1eed7f0c4425e7935f5eddd8fa9" - integrity sha512-AexA0y6nQI10X27J+nBxWo988/tbx9aBr5PhdRxRxhQsop3TyzqgiljxHJDxk7ccYC80zdXnj0BQ6mLxcLn0BA== +edge-currency-accountbased@^4.31.2: + version "4.31.2" + resolved "https://registry.yarnpkg.com/edge-currency-accountbased/-/edge-currency-accountbased-4.31.2.tgz#a8f3cae58865228f1ae6d13bba02715fd10a132e" + integrity sha512-cMVeFDmXdHM0M5PeMPQ64RbxizlSy1wIis/RwRRflri+PFj2zPRITihX5c/NHC6gTaSe6nA/2gBTho6Ecq6fzA== dependencies: "@binance-chain/javascript-sdk" "^4.2.0" "@chain-registry/client" "^1.15.0" From f7d6564463793e076428dbfdc05ecd3eb4f4f893 Mon Sep 17 00:00:00 2001 From: Sam Holmes Date: Wed, 11 Dec 2024 16:35:54 -0800 Subject: [PATCH 65/67] Upgrade edge-currency-accountbased@^4.31.3 --- ios/Podfile.lock | 4 ++-- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 6496aebda7a..482fe3103ff 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -17,7 +17,7 @@ PODS: - DoubleConversion (1.1.6) - edge-core-js (2.21.0): - React-Core - - edge-currency-accountbased (4.31.2): + - edge-currency-accountbased (4.31.3): - React-Core - edge-currency-plugins (3.4.4): - React-Core @@ -1081,7 +1081,7 @@ SPEC CHECKSUMS: disklet: e7ed3e673ccad9d175a1675f9f3589ffbf69a5fd DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 edge-core-js: 10f2bb3facfd5c5dced56cefcda54c90f82799b6 - edge-currency-accountbased: db237a8deb41237dabae726387926698445d23e0 + edge-currency-accountbased: d34e32c5bc82a7159c5354c584e470821826ff48 edge-currency-plugins: 95577a282061148263207fad9befe11bb07a57c1 edge-exchange-plugins: fd725d2fbe76ea0cc8eba1711c565f401cfb6c1b edge-login-ui-rn: 70f8057108ae213e43583a0b3876c88c500c27bc diff --git a/package.json b/package.json index 80119b5d37d..1e2cd2d4d0e 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "detect-bundler": "^1.1.0", "disklet": "^0.5.2", "edge-core-js": "^2.21.0", - "edge-currency-accountbased": "^4.31.2", + "edge-currency-accountbased": "^4.31.3", "edge-currency-monero": "^1.3.2", "edge-currency-plugins": "^3.4.4", "edge-exchange-plugins": "^2.15.1", diff --git a/yarn.lock b/yarn.lock index 10f379bd472..2ce544fc202 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9324,10 +9324,10 @@ edge-core-js@^2.21.0: yaob "^0.3.12" yavent "^0.1.3" -edge-currency-accountbased@^4.31.2: - version "4.31.2" - resolved "https://registry.yarnpkg.com/edge-currency-accountbased/-/edge-currency-accountbased-4.31.2.tgz#a8f3cae58865228f1ae6d13bba02715fd10a132e" - integrity sha512-cMVeFDmXdHM0M5PeMPQ64RbxizlSy1wIis/RwRRflri+PFj2zPRITihX5c/NHC6gTaSe6nA/2gBTho6Ecq6fzA== +edge-currency-accountbased@^4.31.3: + version "4.31.3" + resolved "https://registry.yarnpkg.com/edge-currency-accountbased/-/edge-currency-accountbased-4.31.3.tgz#584ab88c9e94785bf89ca1dfc90308e7fcc94f9f" + integrity sha512-vBfFJ8a0+TDSXP+EZuyTaCYfFXAZVOndgzwuSi+RyIZzG+uZzOXedTvPCrXWbsj4kQFX5vnygSYRXxdb8D4HFA== dependencies: "@binance-chain/javascript-sdk" "^4.2.0" "@chain-registry/client" "^1.15.0" From f434b21a685269727deefd599886155e400b7371 Mon Sep 17 00:00:00 2001 From: Sam Holmes Date: Thu, 12 Dec 2024 12:19:06 -0800 Subject: [PATCH 66/67] Update Banxa payment types --- CHANGELOG.md | 1 + src/plugins/gui/providers/banxaProvider.ts | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88be98811d9..8f2dc95a299 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - added: "Add Wallet" button to bottom of `WalletListScene` - added: `isBuiltInAsset` param for 'Exchange_Shift_Success' tracking event - added: Show all Zcash addresses on Request scene +- changed: Credit and apply pay payment types changed from Banxa provider. - changed: Support optional Sideshift private key - changed: Upgrade edge-core-js to v2.21.0 - changed: Filter CreateWalletItem list by networkLocation instead of tokenId diff --git a/src/plugins/gui/providers/banxaProvider.ts b/src/plugins/gui/providers/banxaProvider.ts index a7153cf3c50..0646e452055 100644 --- a/src/plugins/gui/providers/banxaProvider.ts +++ b/src/plugins/gui/providers/banxaProvider.ts @@ -105,7 +105,6 @@ const asBanxaTxLimit = asObject({ }) const asBanxaPaymentType = asValue( - 'CHECKOUTCREDIT', 'CLEARJCNSELLFP', 'CLEARJCNSELLSEPA', 'CLEARJUNCTION', @@ -118,8 +117,8 @@ const asBanxaPaymentType = asValue( 'IDEAL', 'MANUALPAYMENT', 'MONOOVAPAYID', - 'WORLDPAYAPPLE', - 'WORLDPAYCREDIT', + 'PRIMERAP', + 'PRIMERCC', 'WORLDPAYGOOGLE' ) @@ -828,7 +827,6 @@ const addToAllowedCurrencies = ( } const typeMap: { [Payment in BanxaPaymentType]: FiatPaymentType } = { - CHECKOUTCREDIT: 'credit', CLEARJCNSELLFP: 'fasterpayments', CLEARJCNSELLSEPA: 'sepa', CLEARJUNCTION: 'sepa', @@ -841,8 +839,8 @@ const typeMap: { [Payment in BanxaPaymentType]: FiatPaymentType } = { IDEAL: 'ideal', MANUALPAYMENT: 'turkishbank', MONOOVAPAYID: 'payid', - WORLDPAYAPPLE: 'applepay', - WORLDPAYCREDIT: 'credit', + PRIMERAP: 'applepay', + PRIMERCC: 'credit', WORLDPAYGOOGLE: 'googlepay' } From 3468c9a0fffd41225c48658ae8cd943849b4d10b Mon Sep 17 00:00:00 2001 From: Sam Holmes Date: Thu, 12 Dec 2024 15:36:25 -0800 Subject: [PATCH 67/67] Upgrade edge-currency-plugins@^3.4.5 --- ios/Podfile.lock | 4 ++-- package.json | 2 +- yarn.lock | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 482fe3103ff..c461bf4ce58 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -19,7 +19,7 @@ PODS: - React-Core - edge-currency-accountbased (4.31.3): - React-Core - - edge-currency-plugins (3.4.4): + - edge-currency-plugins (3.4.5): - React-Core - edge-exchange-plugins (2.15.1): - React-Core @@ -1082,7 +1082,7 @@ SPEC CHECKSUMS: DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 edge-core-js: 10f2bb3facfd5c5dced56cefcda54c90f82799b6 edge-currency-accountbased: d34e32c5bc82a7159c5354c584e470821826ff48 - edge-currency-plugins: 95577a282061148263207fad9befe11bb07a57c1 + edge-currency-plugins: 797acb6852c2f0a3ccf5e6bde510cc85ee591402 edge-exchange-plugins: fd725d2fbe76ea0cc8eba1711c565f401cfb6c1b edge-login-ui-rn: 70f8057108ae213e43583a0b3876c88c500c27bc EXApplication: d8f53a7eee90a870a75656280e8d4b85726ea903 diff --git a/package.json b/package.json index 1e2cd2d4d0e..cfe8686cd96 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "edge-core-js": "^2.21.0", "edge-currency-accountbased": "^4.31.3", "edge-currency-monero": "^1.3.2", - "edge-currency-plugins": "^3.4.4", + "edge-currency-plugins": "^3.4.5", "edge-exchange-plugins": "^2.15.1", "edge-info-server": "^3.0.1", "edge-login-ui-rn": "^3.24.0", diff --git a/yarn.lock b/yarn.lock index 2ce544fc202..4c5fc7c622a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9387,16 +9387,16 @@ edge-currency-monero@^1.3.2: buffer "^5.0.6" uri-js "^3.0.2" -edge-currency-plugins@^3.4.4: - version "3.4.4" - resolved "https://registry.yarnpkg.com/edge-currency-plugins/-/edge-currency-plugins-3.4.4.tgz#075635df788bcfd5bee46c76f5a2373a07c17e13" - integrity sha512-TMqkhZdx92UMUnotwf6rsB0Z90PU931SHRXZ7tMaUdBhSwr84PT4mx15BEGRF5OUXRTcsKe+evpLz2LTmlpHHg== +edge-currency-plugins@^3.4.5: + version "3.4.5" + resolved "https://registry.yarnpkg.com/edge-currency-plugins/-/edge-currency-plugins-3.4.5.tgz#ac056c8abcf6c8257b7470dd9778ce0f3a2f9476" + integrity sha512-UNb7ekaKR/KdO2bDWQ2mE0U1c7q+tWefQX51Zz7/0u7JLrRPbAZIADBkcLOFu6yL85hYHDWe30u6DUgRJ5uFzg== dependencies: "@bitcoin-js/tiny-secp256k1-asmjs" "^2.2.3" altcoin-js "^1.0.0" async-mutex "^0.2.6" baselet "^0.3.0" - biggystring "^4.1.3" + biggystring "^4.2.3" bip32 "^2.0.5" bip32grs "^2.0.5" bip39 "^3.0.2"