From 31cd4abeaf8940f5cf73b8c47d4cf1e61c08a266 Mon Sep 17 00:00:00 2001 From: Chloe <44501120+chloezxyy@users.noreply.github.com> Date: Tue, 3 Oct 2023 13:44:42 +0800 Subject: [PATCH] feature(ui-ux): enable transfer domain (#4032) * fix(ui-ux): filter out LP tokens in EVM domain * fix(ui-ux): UI labels for address types * fix(ui-ux): sendconfirmationscreen evm bg for addresses * fix(ui-ux): hide any address labels if there are error messages * remove unused comment * fix lint * fix(ui-ux): to display address label even with err msg * fix(ui-ux): labelled address * fix(ui-ux): cater for selected whitelisted evm addr * feat(e2e): add tests * fix: lint for AddressRow * feat: enable transfer domain * fix(ui-ux): update UI for convert confirmation screen * fix(e2e): network details * Revert "fix(e2e): network details" This reverts commit c29aef84836faef72a11278bdfd45724d05043fc. * fix(ui-ux): update isEVMDomain flag * fix(ui-ux): remove LP filter * fix(lint): add empty data for evmtx --------- Co-authored-by: Lyka Labrada --- docker-compose.yml | 7 +- .../app/api/transaction/transfer_domain.ts | 13 +- mobile-app/app/components/SummaryTitle.tsx | 106 ++-- mobile-app/app/hooks/useWalletAddress.ts | 3 +- .../screens/Portfolio/PortfolioNavigator.tsx | 3 +- .../screens/Portfolio/PortfolioScreen.tsx | 7 +- .../Portfolio/components/AddressRow.tsx | 218 +++++--- .../Portfolio/components/PortfolioCard.tsx | 1 + .../Portfolio/components/TokenNameText.tsx | 6 +- .../Portfolio/screens/AddressBookScreen.tsx | 19 +- .../screens/ConvertConfirmationScreen.tsx | 2 +- .../screens/SendConfirmationScreen.tsx | 42 +- .../screens/Portfolio/screens/SendScreen.tsx | 8 +- .../screens/TokenSelectionScreen.tsx | 44 +- .../wallet/portfolio/addresses.spec.ts | 8 +- .../wallet/portfolio/portfolio.spec.ts | 99 +++- .../functional/wallet/portfolio/send.spec.ts | 296 ++++++++-- package-lock.json | 509 +++++++++++------- package.json | 2 +- 19 files changed, 952 insertions(+), 441 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ed37f5d4f3..4938f77044 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,7 +17,7 @@ services: - "/var/run/docker.sock:/var/run/docker.sock:ro" defi-blockchain: - image: defi/defichain:master-91a01aea0 + image: defi/defichain:master-b352814976 command: > defid -printtoconsole @@ -55,10 +55,9 @@ services: -grandcentralheight=16 -grandcentralepilogueheight=17 -nextnetworkupgradeheight=18 - -changiintermediateheight=19 defi-playground: - image: ghcr.io/birthdayresearch/playground-api:3.34.0 + image: ghcr.io/birthdayresearch/playground-api:4.0.0-rc.1.2 depends_on: - defi-blockchain ports: @@ -71,7 +70,7 @@ services: - "traefik.http.routers.playground.entrypoints=web" defi-whale: - image: ghcr.io/birthdayresearch/whale-api:3.34.0 + image: ghcr.io/birthdayresearch/whale-api:4.0.0-rc.1.2 depends_on: - defi-blockchain ports: diff --git a/mobile-app/app/api/transaction/transfer_domain.ts b/mobile-app/app/api/transaction/transfer_domain.ts index 5c40380784..dc016ab4d1 100644 --- a/mobile-app/app/api/transaction/transfer_domain.ts +++ b/mobile-app/app/api/transaction/transfer_domain.ts @@ -48,18 +48,20 @@ export async function transferDomainSigner( src: { address: sourceScript, amount: { - token: Number(sourceTokenId), + token: stripEvmSuffixFromTokenId(sourceTokenId), amount, }, domain: srcDomain, + data: new Uint8Array([]), }, dst: { address: dstScript, amount: { - token: Number(targetTokenId), + token: stripEvmSuffixFromTokenId(targetTokenId), amount, }, domain: dstDomain, + data: new Uint8Array([]), }, }, ], @@ -139,3 +141,10 @@ export function transferDomainCrafter( : undefined, }; } + +function stripEvmSuffixFromTokenId(tokenId: string) { + if (tokenId.includes("-EVM")) { + return Number(tokenId.replace("-EVM", "")); + } + return Number(tokenId); +} diff --git a/mobile-app/app/components/SummaryTitle.tsx b/mobile-app/app/components/SummaryTitle.tsx index b0fba129c2..c21ad98cd2 100644 --- a/mobile-app/app/components/SummaryTitle.tsx +++ b/mobile-app/app/components/SummaryTitle.tsx @@ -5,6 +5,9 @@ import { getNativeIcon } from "@components/icons/assets"; import { translate } from "@translations"; import { RandomAvatar } from "@screens/AppNavigator/screens/Portfolio/components/RandomAvatar"; import { AddressType } from "@waveshq/walletkit-ui/dist/store"; +import { LocalAddress, WhitelistedAddress } from "@store/userPreferences"; +import { DomainType } from "@contexts/DomainContext"; +import { LinearGradient } from "expo-linear-gradient"; import { View } from "."; import { ThemedTextV2, ThemedViewV2 } from "./themed"; import { EVMLinearGradient } from "./EVMLinearGradient"; @@ -22,6 +25,7 @@ interface ISummaryTitleProps { iconB?: string; addressType?: AddressType; amountTextStyle?: string; + matchedAddress?: LocalAddress | WhitelistedAddress; isEvmToken?: boolean; } @@ -123,39 +127,81 @@ export function SummaryTitle(props: ISummaryTitleProps): JSX.Element { > {props.customToAddressTitle ?? translate("screens/common", "To")} - - {props.addressType === AddressType.WalletAddress && ( - - - - )} - - {props.toAddressLabel != null && props.toAddressLabel.length > 0 - ? props.toAddressLabel - : props.toAddress} - - + {props.addressType === AddressType.WalletAddress && ( + + + + )} + + {props.toAddressLabel != null && + props.toAddressLabel.length > 0 + ? props.toAddressLabel + : props.toAddress} + + + ) : ( + + {props.addressType === AddressType.WalletAddress && ( + + + + )} + + {props.toAddressLabel != null && + props.toAddressLabel.length > 0 + ? props.toAddressLabel + : props.toAddress} + + + )} )} diff --git a/mobile-app/app/hooks/useWalletAddress.ts b/mobile-app/app/hooks/useWalletAddress.ts index 54df35db1d..8d6a9f2095 100644 --- a/mobile-app/app/hooks/useWalletAddress.ts +++ b/mobile-app/app/hooks/useWalletAddress.ts @@ -18,8 +18,7 @@ export function useWalletAddress(): { for (let i = 0; i <= addressLength; i++) { const account = wallet.get(i); const dvm = await account.getAddress(); - // TODO (Harsh) replace it with getEvmAddress - const evm = "evmaddress"; // await account.getEvmAddress(); + const evm = await account.getEvmAddress(); addresses.push({ dvm, evm }); } return addresses; diff --git a/mobile-app/app/screens/AppNavigator/screens/Portfolio/PortfolioNavigator.tsx b/mobile-app/app/screens/AppNavigator/screens/Portfolio/PortfolioNavigator.tsx index 8eb5fe5918..61b26be88f 100644 --- a/mobile-app/app/screens/AppNavigator/screens/Portfolio/PortfolioNavigator.tsx +++ b/mobile-app/app/screens/AppNavigator/screens/Portfolio/PortfolioNavigator.tsx @@ -9,7 +9,7 @@ import { BarCodeScanner } from "@components/BarCodeScanner"; import { HeaderTitle } from "@components/HeaderTitle"; import { tailwind } from "@tailwind"; import { translate } from "@translations"; -import { WhitelistedAddress } from "@store/userPreferences"; +import { LocalAddress, WhitelistedAddress } from "@store/userPreferences"; import { FutureSwapData } from "@store/futureSwap"; import { TransactionsScreen } from "@screens/AppNavigator/screens/Transactions/TransactionsScreen"; import { TransactionDetailScreen } from "@screens/AppNavigator/screens/Transactions/screens/TransactionDetailScreen"; @@ -78,6 +78,7 @@ export interface PortfolioParamList { toAddressLabel?: string; addressType?: AddressType; originScreen?: ScreenName; + matchedAddress?: WhitelistedAddress | LocalAddress; }; TokenDetailScreen: { token: WalletToken }; ConvertScreen: { diff --git a/mobile-app/app/screens/AppNavigator/screens/Portfolio/PortfolioScreen.tsx b/mobile-app/app/screens/AppNavigator/screens/Portfolio/PortfolioScreen.tsx index 8a2fa06ae4..925fec9db0 100644 --- a/mobile-app/app/screens/AppNavigator/screens/Portfolio/PortfolioScreen.tsx +++ b/mobile-app/app/screens/AppNavigator/screens/Portfolio/PortfolioScreen.tsx @@ -367,13 +367,18 @@ export function PortfolioScreen({ navigation }: Props): JSX.Element { return filteredTokens.sort(sortTokensFunc); }, - [filteredTokens, assetSortType, denominationCurrency], + [domain, filteredTokens, assetSortType, denominationCurrency], ); useEffect(() => { setAssetSortType(PortfolioSortType.HighestDenominationValue); // reset sorting state upon denominationCurrency change }, [denominationCurrency]); + // Reset button group in EVM domain + useEffect(() => { + setActiveButtonGroup(ButtonGroupTabKey.AllTokens); + }, [domain]); + // token tab items const [activeButtonGroup, setActiveButtonGroup] = useState( ButtonGroupTabKey.AllTokens, diff --git a/mobile-app/app/screens/AppNavigator/screens/Portfolio/components/AddressRow.tsx b/mobile-app/app/screens/AppNavigator/screens/Portfolio/components/AddressRow.tsx index 8ce9d1bf2c..02802c8ae3 100644 --- a/mobile-app/app/screens/AppNavigator/screens/Portfolio/components/AddressRow.tsx +++ b/mobile-app/app/screens/AppNavigator/screens/Portfolio/components/AddressRow.tsx @@ -23,6 +23,13 @@ import { useEffect, useMemo, useState } from "react"; import { useSelector } from "react-redux"; import { RootState } from "@store"; import { WalletAddressI, useWalletAddress } from "@hooks/useWalletAddress"; +import { DomainType, useDomainContext } from "@contexts/DomainContext"; +import { LinearGradient } from "expo-linear-gradient"; +import { + getAddressType, + AddressType as JellyfishAddressType, +} from "@waveshq/walletkit-core"; +import { Text } from "@components"; export function AddressRow({ control, @@ -38,6 +45,8 @@ export function AddressRow({ onAddressType, showQrButton = true, onlyLocalAddress, + matchedAddress, + setMatchedAddress, }: { control: Control; networkName: NetworkName; @@ -54,8 +63,11 @@ export function AddressRow({ onAddressType?: (addressType?: AddressType) => void; showQrButton?: boolean; onlyLocalAddress?: boolean; + matchedAddress?: LocalAddress | WhitelistedAddress | undefined; + setMatchedAddress?: (address?: LocalAddress | WhitelistedAddress) => void; }): JSX.Element { const { fetchWalletAddresses } = useWalletAddress(); + const { domain } = useDomainContext(); const defaultValue = ""; @@ -69,10 +81,9 @@ export function AddressRow({ const [jellyfishWalletAddress, setJellyfishWalletAddresses] = useState< WalletAddressI[] >([]); - const [matchedAddress, setMatchedAddress] = useState< - LocalAddress | WhitelistedAddress - >(); const [addressType, setAddressType] = useState(); + const [validEvmAddress, setValidEvmAddress] = useState(false); + const validLocalAddress = useMemo(() => { if (address === "") { return true; @@ -84,26 +95,28 @@ export function AddressRow({ }, [onlyLocalAddress, addressType, address]); const debounceMatchAddress = debounce(() => { - if ( - address !== undefined && - addressBook !== undefined && - addressBook[address] !== undefined - ) { - setMatchedAddress(addressBook[address]); - setAddressType(AddressType.Whitelisted); - } else if ( - address !== undefined && - walletAddress !== undefined && - walletAddress[address] !== undefined - ) { - setMatchedAddress(walletAddress[address]); - setAddressType(AddressType.WalletAddress); - } else { + // Check if address input field is not empty + if (address !== undefined && setMatchedAddress !== undefined) { + if (addressBook !== undefined && addressBook[address] !== undefined) { + // Whitelisted Addresses + setMatchedAddress(addressBook[address]); + setAddressType(AddressType.Whitelisted); + return; + } + + // Your Address - Labelled + if (walletAddress !== undefined && walletAddress[address] !== undefined) { + setMatchedAddress(walletAddress[address]); + setAddressType(AddressType.WalletAddress); + return; + } + const addressObj = jellyfishWalletAddress.find( (e: WalletAddressI) => e.dvm === address || e.evm === address, ); - if (address !== undefined && addressObj) { - // wallet address that does not have a label + + if (addressObj) { + // Your addresses - Unlabelled setMatchedAddress({ address: addressObj.dvm, evmAddress: addressObj.evm, @@ -111,10 +124,17 @@ export function AddressRow({ }); setAddressType(AddressType.WalletAddress); } else { - setMatchedAddress(undefined); + setMatchedAddress(undefined); // Unsaved valid DVM address if (onlyLocalAddress) { setAddressType(undefined); + } else if ( + getAddressType(address, networkName) === JellyfishAddressType.ETH + ) { + // Unsaved and valid EVM address + setAddressType(AddressType.OthersButValid); + setValidEvmAddress(true); } else { + setValidEvmAddress(false); setAddressType( fromAddress(address, networkName) !== undefined ? AddressType.OthersButValid @@ -236,78 +256,108 @@ export function AddressRow({ required: true, validate: { isValidAddress: (address) => - fromAddress(address, networkName) !== undefined && - (!onlyLocalAddress || - jellyfishWalletAddress.includes(address) || - (walletAddress !== undefined && - walletAddress[address] !== undefined)), + // Check if its either a valid EVM/DVM address && + !!getAddressType(address, networkName) && + // EVM -> EVM domain transfer is not allowed + !( + getAddressType(address, networkName) === + JellyfishAddressType.ETH && domain === DomainType.EVM + ), }, }} /> - {addressType !== undefined && ( - - {addressType === AddressType.OthersButValid ? ( - <> - - - {translate("screens/SendScreen", "Verified")} - - - ) : ( - addressType !== undefined && - validLocalAddress && ( - - {addressType === AddressType.WalletAddress && ( - - - - )} - + + {addressType !== undefined && ( + <> + {/* Verified tag for DVM/EVM address */} + {addressType === AddressType.OthersButValid && ( + <> + - {matchedAddress?.label !== "" - ? matchedAddress?.label - : matchedAddress.address} + {translate("screens/SendScreen", "Verified {{text}}", { + text: validEvmAddress ? "MetaChain (EVM) address" : "", + })} - - ) - )} - - )} + + )} + {addressType !== AddressType.OthersButValid && + validLocalAddress && ( + <> + {/* TODO @chloe cater for selection of evm addr from addr pair */} + {(matchedAddress as WhitelistedAddress)?.addressDomainType === + DomainType.EVM ? ( + // || (matchedAddress as LocalAddress)?.evmAddress ? + + {/* TODO add avatar for after updating address book design */} + + {matchedAddress?.label || matchedAddress?.address} + + + ) : ( + + {addressType === AddressType.WalletAddress && ( + + + + )} + + {matchedAddress?.label || matchedAddress?.address} + + + )} + + )} + + )} + ); } diff --git a/mobile-app/app/screens/AppNavigator/screens/Portfolio/components/PortfolioCard.tsx b/mobile-app/app/screens/AppNavigator/screens/Portfolio/components/PortfolioCard.tsx index 85aabe9a43..518bbb5604 100644 --- a/mobile-app/app/screens/AppNavigator/screens/Portfolio/components/PortfolioCard.tsx +++ b/mobile-app/app/screens/AppNavigator/screens/Portfolio/components/PortfolioCard.tsx @@ -122,6 +122,7 @@ function PortfolioItemRow({ displaySymbol={token.displaySymbol} name={token.name} testID={testID} + isEvmDomain={isEvmDomain} /> - {name} + {tokenName} )} diff --git a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/AddressBookScreen.tsx b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/AddressBookScreen.tsx index 2a8296354c..c1ec623976 100644 --- a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/AddressBookScreen.tsx +++ b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/AddressBookScreen.tsx @@ -64,12 +64,8 @@ export enum ButtonGroupTabKey { } export function AddressBookScreen({ route, navigation }: Props): JSX.Element { - const { - selectedAddress, - onAddressSelect, - disabledTab, - addressDomainType = DomainType.DVM, - } = route.params; + const { selectedAddress, onAddressSelect, disabledTab, addressDomainType } = + route.params; const { isLight } = useThemeContext(); const { network } = useNetworkContext(); const dispatch = useAppDispatch(); @@ -284,11 +280,14 @@ export function AddressBookScreen({ route, navigation }: Props): JSX.Element { onAddressSelect?: (address: string) => void; }): JSX.Element => { const { item, index, testIDSuffix } = props; - // to disable address select of non compatible address type const isDisabledToSelect = !!( - enableAddressSelect && - activeButtonGroup === ButtonGroupTabKey.Whitelisted && - (item as WhitelistedAddress).addressDomainType !== addressDomainType + ( + enableAddressSelect && + activeButtonGroup === ButtonGroupTabKey.Whitelisted && + (item as WhitelistedAddress).addressDomainType === + addressDomainType && + addressDomainType === DomainType.EVM + ) // disable address selection if its from the same EVM domain ); const onChangeAddress = ( diff --git a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/ConvertConfirmationScreen.tsx b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/ConvertConfirmationScreen.tsx index 56fddff9d9..b789622eb3 100644 --- a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/ConvertConfirmationScreen.tsx +++ b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/ConvertConfirmationScreen.tsx @@ -235,7 +235,7 @@ export function ConvertConfirmationScreen({ route }: Props): JSX.Element { fee, }), suffix: ` ${sourceToken.displayTextSymbol}${ - convertDirection === ConvertDirection.dvmToEvm ? "-EVM" : "" + convertDirection === ConvertDirection.dvmToEvm ? "" : "-EVM" }`, testID: "resulting_tokens_value", themedProps: { diff --git a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/SendConfirmationScreen.tsx b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/SendConfirmationScreen.tsx index 4b35a0ed21..26e2c3b0a9 100644 --- a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/SendConfirmationScreen.tsx +++ b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/SendConfirmationScreen.tsx @@ -62,13 +62,14 @@ export function SendConfirmationScreen({ route }: Props): JSX.Element { toAddressLabel, addressType, originScreen, + matchedAddress, } = route.params; const logger = useLogger(); const hasPendingJob = useSelector((state: RootState) => - hasTxQueued(state.transactionQueue) + hasTxQueued(state.transactionQueue), ); const hasPendingBroadcastJob = useSelector((state: RootState) => - hasOceanTXQueued(state.ocean) + hasOceanTXQueued(state.ocean), ); const dispatch = useAppDispatch(); const [isSubmitting, setIsSubmitting] = useState(false); @@ -101,7 +102,7 @@ export function SendConfirmationScreen({ route }: Props): JSX.Element { () => { onTransactionBroadcast(isOnPage, navigation.dispatch); }, - logger + logger, ); setIsSubmitting(false); } @@ -112,7 +113,7 @@ export function SendConfirmationScreen({ route }: Props): JSX.Element { title: translate("screens/Settings", "Cancel transaction"), message: translate( "screens/Settings", - "By cancelling, you will lose any changes you made for your transaction." + "By cancelling, you will lose any changes you made for your transaction.", ), buttons: [ { @@ -126,7 +127,7 @@ export function SendConfirmationScreen({ route }: Props): JSX.Element { navigation.navigate( originScreen === ScreenName.DEX_screen ? ScreenName.DEX_screen - : ScreenName.PORTFOLIO_screen + : ScreenName.PORTFOLIO_screen, ); }, }, @@ -149,6 +150,7 @@ export function SendConfirmationScreen({ route }: Props): JSX.Element { toAddress={destination} toAddressLabel={toAddressLabel} addressType={addressType} + matchedAddress={matchedAddress} /> {conversion?.isConversionRequired === true && ( @@ -164,7 +166,7 @@ export function SendConfirmationScreen({ route }: Props): JSX.Element { lhs={{ value: translate( "screens/SendConfirmationScreen", - "Amount to convert" + "Amount to convert", ), testID: "amount_to_convert", themedProps: { @@ -184,7 +186,7 @@ export function SendConfirmationScreen({ route }: Props): JSX.Element { /> {conversion?.isConverted !== true && ( @@ -221,7 +223,7 @@ export function SendConfirmationScreen({ route }: Props): JSX.Element { containerStyle={{ style: tailwind( "flex-row items-start w-full bg-transparent border-t-0.5 pt-5", - { "mt-8": conversion?.isConversionRequired !== true } + { "mt-8": conversion?.isConversionRequired !== true }, ), light: tailwind("bg-transparent border-mono-light-v2-300"), dark: tailwind("bg-transparent border-mono-dark-v2-300"), @@ -229,7 +231,7 @@ export function SendConfirmationScreen({ route }: Props): JSX.Element { lhs={{ value: translate( "screens/SendConfirmationScreen", - "Transaction fee" + "Transaction fee", ), testID: "transaction_fee", themedProps: { @@ -250,7 +252,7 @@ export function SendConfirmationScreen({ route }: Props): JSX.Element { {translate( "screens/SendConfirmationScreen", - "I acknowledge that sending LP tokens to addresses that are not DeFiChain compatible wallets may result in irreversible loss of funds." + "I acknowledge that sending LP tokens to addresses that are not DeFiChain compatible wallets may result in irreversible loss of funds.", )} @@ -353,13 +355,13 @@ async function send( { address, token, amount, networkName }: SendForm, dispatch: Dispatch, onBroadcast: () => void, - logger: NativeLoggingProps + logger: NativeLoggingProps, ): Promise { try { const to = DeFiAddress.from(networkName, address).getScript(); const signer = async ( - account: WhaleWalletAccount + account: WhaleWalletAccount, ): Promise => { const script = await account.getScript(); const builder = account.withTransactionBuilder(); @@ -385,7 +387,7 @@ async function send( }, ], }, - script + script, ); } return new CTransactionSegWit(signed); @@ -401,7 +403,7 @@ async function send( amount: amount.toFixed(8), displaySymbol: token.displaySymbol, toAddress: address, - } + }, ), drawerMessages: { preparing: translate("screens/OceanInterface", "Preparing to send…"), @@ -411,7 +413,7 @@ async function send( { amount: amount.toFixed(8), displaySymbol: token.displaySymbol, - } + }, ), complete: translate( "screens/OceanInterface", @@ -419,11 +421,11 @@ async function send( { amount: amount.toFixed(8), displaySymbol: token.displaySymbol, - } + }, ), }, onBroadcast, - }) + }), ); } catch (e) { logger.error(e); diff --git a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/SendScreen.tsx b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/SendScreen.tsx index 1256a22eda..3621325055 100644 --- a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/SendScreen.tsx +++ b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/SendScreen.tsx @@ -42,7 +42,7 @@ import { import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view"; import { useSafeAreaInsets } from "react-native-safe-area-context"; import { AddressRow } from "@screens/AppNavigator/screens/Portfolio/components/AddressRow"; -import { DomainType } from "@contexts/DomainContext"; +import { useDomainContext } from "@contexts/DomainContext"; import { ConvertDirection } from "@screens/enum"; import { useTokenPrice } from "../hooks/TokenPrice"; import { ActiveUSDValueV2 } from "../../Loans/VaultDetail/components/ActiveUSDValueV2"; @@ -92,6 +92,7 @@ export function SendScreen({ route, navigation }: Props): JSX.Element { const DFIToken = useSelector((state: RootState) => DFITokenSelector(state.wallet), ); + const { domain } = useDomainContext(); const [token, setToken] = useState(route.params?.token); const [matchedAddress, setMatchedAddress] = useState< @@ -264,6 +265,7 @@ export function SendScreen({ route, navigation }: Props): JSX.Element { fee, toAddressLabel: matchedAddress?.label, addressType, + matchedAddress, }; if (isConversionRequired) { @@ -415,7 +417,7 @@ export function SendScreen({ route, navigation }: Props): JSX.Element { name: "AddressBookScreen", params: { selectedAddress: getValues("address"), - addressDomainType: DomainType.DVM, + addressDomainType: domain, onAddressSelect, }, merge: true, @@ -444,6 +446,8 @@ export function SendScreen({ route, navigation }: Props): JSX.Element { address={address} onMatchedAddress={setMatchedAddress} onAddressType={setAddressType} + matchedAddress={matchedAddress} + setMatchedAddress={setMatchedAddress} /> )} diff --git a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/TokenSelectionScreen.tsx b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/TokenSelectionScreen.tsx index 2fa8b1dfe9..a38e6d64f7 100644 --- a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/TokenSelectionScreen.tsx +++ b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/TokenSelectionScreen.tsx @@ -27,6 +27,7 @@ import { SkeletonLoaderScreen, } from "@components/SkeletonLoader"; import { ListRenderItemInfo } from "@shopify/flash-list"; +import { DomainType, useDomainContext } from "@contexts/DomainContext"; import { PortfolioParamList } from "../PortfolioNavigator"; import { ActiveUSDValueV2 } from "../../Loans/VaultDetail/components/ActiveUSDValueV2"; import { TokenIcon } from "../components/TokenIcon"; @@ -51,9 +52,10 @@ export interface BottomSheetToken { export function TokenSelectionScreen(): JSX.Element { const { isLight } = useThemeContext(); + const { domain } = useDomainContext(); const navigation = useNavigation>(); const tokens = useSelector((state: RootState) => - tokensSelector(state.wallet) + tokensSelector(state.wallet), ); const { hasFetchedToken } = useSelector((state: RootState) => state.wallet); const [searchString, setSearchString] = useState(""); @@ -63,7 +65,13 @@ export function TokenSelectionScreen(): JSX.Element { const [isSearchFocus, setIsSearchFocus] = useState(false); const searchRef = useRef(); - const tokensWithBalance = getTokensWithBalance(tokens, getTokenPrice); + const filteredTokensByDomain = + domain === DomainType.EVM ? tokens.filter((t) => !t.isLPS) : tokens; + + const tokensWithBalance = getTokensWithBalance( + filteredTokensByDomain, + getTokenPrice, + ); const filteredTokensWithBalance = useMemo(() => { return filterTokensBySearchTerm(tokensWithBalance, debouncedSearchTerm); }, [tokensWithBalance, debouncedSearchTerm]); @@ -84,11 +92,14 @@ export function TokenSelectionScreen(): JSX.Element { return ( { navigation.navigate({ name: "SendScreen", params: { - token: tokens.find((t) => item.tokenId === t.id), + token: filteredTokensByDomain.find( + (t) => t.id === item.tokenId, + ), }, merge: true, }); @@ -118,7 +129,7 @@ export function TokenSelectionScreen(): JSX.Element { }} placeholder={translate( "screens/TokenSelectionScreen", - "Search token" + "Search token", )} showClearButton={debouncedSearchTerm !== ""} onClearInput={() => { @@ -158,7 +169,7 @@ export function TokenSelectionScreen(): JSX.Element { {translate( "screens/TokenSelectionScreen", "Search results for “{{searchTerm}}”", - { searchTerm: debouncedSearchTerm } + { searchTerm: debouncedSearchTerm }, )} )} @@ -179,11 +190,13 @@ export function TokenSelectionScreen(): JSX.Element { interface TokenSelectionRowProps { item: TokenSelectionItem; onPress: any; + domain: DomainType; } function TokenSelectionRow({ item, onPress, + domain, }: TokenSelectionRowProps): JSX.Element { return ( @@ -209,6 +222,7 @@ function TokenSelectionRow({ displaySymbol={item.token.displaySymbol} name={item.token.name} testID={item.token.displaySymbol} + isEvmDomain={domain === DomainType.EVM} /> @@ -242,7 +256,7 @@ function EmptyAsset({ return ( @@ -268,7 +282,7 @@ function EmptyAsset({ > {translate( "screens/TokenSelectionScreen", - "Add assets to get started" + "Add assets to get started", )} @@ -286,8 +300,8 @@ function getTokensWithBalance( getTokenPrice: ( symbol: string, amount: BigNumber, - isLPS?: boolean | undefined - ) => BigNumber + isLPS?: boolean | undefined, + ) => BigNumber, ): TokenSelectionItem[] { const reservedFees = 0.1; const filteredTokens: TokenSelectionItem[] = []; @@ -296,7 +310,7 @@ function getTokensWithBalance( const available = new BigNumber( t.displaySymbol === "DFI" ? new BigNumber(t.amount).minus(reservedFees).toFixed(8) - : t.amount + : t.amount, ); if (available.isLessThan(0) || t.id === "0" || t.id === "0_utxo") { return; @@ -318,17 +332,17 @@ function getTokensWithBalance( }); return filteredTokens.sort((a, b) => - b.usdAmount.minus(a.usdAmount).toNumber() + b.usdAmount.minus(a.usdAmount).toNumber(), ); } function filterTokensBySearchTerm( tokens: TokenSelectionItem[], - searchTerm: string + searchTerm: string, ): TokenSelectionItem[] { return tokens.filter((t) => [t.token.displaySymbol, t.token.name].some((searchItem) => - searchItem.toLowerCase().includes(searchTerm.trim().toLowerCase()) - ) + searchItem.toLowerCase().includes(searchTerm.trim().toLowerCase()), + ), ); } diff --git a/mobile-app/cypress/e2e/functional/wallet/portfolio/addresses.spec.ts b/mobile-app/cypress/e2e/functional/wallet/portfolio/addresses.spec.ts index ceb45d7770..dc8038ec59 100644 --- a/mobile-app/cypress/e2e/functional/wallet/portfolio/addresses.spec.ts +++ b/mobile-app/cypress/e2e/functional/wallet/portfolio/addresses.spec.ts @@ -19,6 +19,7 @@ function addLocalStorageFeatureFlag(): void { context("Wallet - Addresses", () => { let whale: WhaleApiClient; + let address: string; before(() => { addLocalStorageFeatureFlag(); @@ -92,6 +93,10 @@ context("Wallet - Addresses", () => { cy.getByTestID("bottomsheet-address-header").contains("EVM"); cy.getByTestID("close_bottom_sheet_button").click(); }); + + // Toggled back to DVM for next test + cy.getByTestID("domain_switch_EVM").should("exist"); + cy.getByTestID("domain_switch").click(); }); it("should be able to create new address when all available address are active", () => { @@ -159,10 +164,7 @@ context("Wallet - Addresses", () => { cy.getByTestID("receive_balance_button").click(); cy.getByTestID("address_text").contains(activeAddress); }); - }); - context("Wallet - Addresses transfer dfi between addresses", () => { - let address: string; it("should able to transfer dfi between addresses", () => { cy.getByTestID("bottom_tab_portfolio").click(); cy.getByTestID("switch_account_button") diff --git a/mobile-app/cypress/e2e/functional/wallet/portfolio/portfolio.spec.ts b/mobile-app/cypress/e2e/functional/wallet/portfolio/portfolio.spec.ts index 958e90b821..5f8085aa14 100644 --- a/mobile-app/cypress/e2e/functional/wallet/portfolio/portfolio.spec.ts +++ b/mobile-app/cypress/e2e/functional/wallet/portfolio/portfolio.spec.ts @@ -419,7 +419,7 @@ context("Wallet - Portfolio page", () => { cy.getByTestID("empty_tokens_title").should("have.text", "Empty portfolio"); cy.getByTestID("empty_tokens_subtitle").should( "have.text", - "Add DFI and other tokens to get started" + "Add DFI and other tokens to get started", ); }); }); @@ -598,7 +598,7 @@ context("Wallet - Portfolio - No balance", () => { it("should enabled send button", () => { cy.getByTestID("send_balance_button").should( "not.have.attr", - "aria-disabled" + "aria-disabled", ); }); @@ -650,7 +650,7 @@ context("Wallet - Portfolio - No balance", () => { .invoke("text") .then((price: string) => { expect(price).to.equal( - `$${new BigNumber(response.price.aggregated.amount).toFixed(2)}` + `$${new BigNumber(response.price.aggregated.amount).toFixed(2)}`, ); }); }); @@ -1024,7 +1024,7 @@ context( }); cy.getByTestID("toggle_sorting_assets").should("exist"); cy.getByTestID("portfolio_button_group_ALL_TOKENS_active").should( - "exist" + "exist", ); cy.getByTestID("portfolio_row_1").should("exist"); // dBTC = row 1 cy.getByTestID("portfolio_button_group_CRYPTO").click(); @@ -1034,21 +1034,21 @@ context( cy.getByTestID("portfolio_button_group_LP_TOKENS_active").should("exist"); cy.getByTestID("empty_tokens_title").should( "have.text", - "No LP tokens found" + "No LP tokens found", ); cy.getByTestID("empty_tokens_subtitle").should( "have.text", - "Add liquidity to get started" + "Add liquidity to get started", ); cy.getByTestID("portfolio_button_group_d_TOKENS").click(); cy.getByTestID("portfolio_button_group_d_TOKENS_active").should("exist"); cy.getByTestID("empty_tokens_title").should( "have.text", - "No dTokens found" + "No dTokens found", ); cy.getByTestID("empty_tokens_subtitle").should( "have.text", - "Mint dTokens to get started" + "Mint dTokens to get started", ); }); it("should exist in All tokens and dTokens tabs, should not exist in LP tokens and Crypto tabs", () => { @@ -1072,34 +1072,34 @@ context( cy.getByTestID("toggle_sorting_assets").should("exist"); cy.getByTestID("portfolio_button_group_ALL_TOKENS").click(); cy.getByTestID("portfolio_button_group_ALL_TOKENS_active").should( - "exist" + "exist", ); cy.getByTestID("portfolio_row_14").should("exist"); // DUSD = row 14 cy.getByTestID("portfolio_button_group_LP_TOKENS").click(); cy.getByTestID("portfolio_button_group_LP_TOKENS_active").should("exist"); cy.getByTestID("empty_tokens_title").should( "have.text", - "No LP tokens found" + "No LP tokens found", ); cy.getByTestID("empty_tokens_subtitle").should( "have.text", - "Add liquidity to get started" + "Add liquidity to get started", ); cy.getByTestID("portfolio_button_group_CRYPTO").click(); cy.getByTestID("portfolio_button_group_CRYPTO_active").should("exist"); cy.getByTestID("empty_tokens_title").should( "have.text", - "No crypto found" + "No crypto found", ); cy.getByTestID("empty_tokens_subtitle").should( "have.text", - "Add crypto to get started" + "Add crypto to get started", ); cy.getByTestID("portfolio_button_group_d_TOKENS").click(); cy.getByTestID("portfolio_button_group_d_TOKENS_active").should("exist"); cy.getByTestID("portfolio_row_14").should("exist"); // DUSD = row 14 }); - } + }, ); context("Wallet - Portfolio - Portfolio group tab", () => { @@ -1119,7 +1119,7 @@ context("Wallet - Portfolio - Portfolio group tab", () => { "$100,000.00", "$100,000.00", "$100,000.00", - "$1,000.00" + "$1,000.00", ); }); @@ -1133,7 +1133,7 @@ context("Wallet - Portfolio - Portfolio group tab", () => { "10.00 DFI", "10.00 DFI", "10.00 DFI", - "0.10000000 DFI" + "0.10000000 DFI", ); }); @@ -1147,7 +1147,7 @@ context("Wallet - Portfolio - Portfolio group tab", () => { "10.00 BTC", "10.00 BTC", "10.00 BTC", - "0.10000000 BTC" + "0.10000000 BTC", ); }); }); @@ -1180,7 +1180,7 @@ function checkPortfolioPageDenominationValues( DfiTotalBalUsdAmt: string, DfiAvailableAmt: string, BtcUsdAmt: string, - EthUsdAmt: string + EthUsdAmt: string, ): void { // TotalPortfolio cy.getByTestID("total_usd_amount").contains(totalUsdAmt); @@ -1213,7 +1213,7 @@ function checkPortfolioPageDenominationValues( function checkAssetsSortingOrder( sortedType: string, firstToken: string, - lastToken: string + lastToken: string, ): void { const containerTestID = '[data-testid="card_balance_row_container"]'; const arrowTestID = "your_assets_dropdown_arrow"; @@ -1282,7 +1282,7 @@ context( it("should sort assets based on Lowest value (DFI)", () => { checkAssetsSortingOrder("Lowest value (DFI)", "dLTC", "dBTC"); }); - } + }, ); function interceptTokensForSorting(data: {}): void { @@ -1311,7 +1311,7 @@ context( interceptTokensForSorting(addLPTokens); checkAssetsSortingOrder("Lowest value (DFI)", "dUSDT-DFI", "dBTC-DFI"); }); - } + }, ); context( @@ -1332,7 +1332,7 @@ context( interceptTokensForSorting(addCrypto); checkAssetsSortingOrder("Lowest value (DFI)", "dETH", "dBTC"); }); - } + }, ); context( @@ -1353,7 +1353,7 @@ context( interceptTokensForSorting(addDTokens); checkAssetsSortingOrder("Lowest value (DFI)", "DUSD", "dTD10"); }); - } + }, ); context( @@ -1373,7 +1373,7 @@ context( it("should sort assets based on Lowest value (BTC)", () => { checkAssetsSortingOrder("Lowest value (BTC)", "DUSD", "dBTC"); }); - } + }, ); context("Wallet - Portfolio - Skeleton Loader", () => { @@ -1548,3 +1548,54 @@ context("Wallet - Portfolio - portfolio", () => { }); }); }); + +context( + "Transfer domain - Wallet - Portfolio - Portfolio group tab - DFI currency", + () => { + before(() => { + cy.createEmptyWallet(true); + cy.getByTestID("header_settings").click(); + cy.getByTestID("bottom_tab_portfolio").click(); + + cy.intercept("**/address/**/tokens?size=*", { + body: { + data: [ + { + amount: "5.00000000", + displaySymbol: "dBTC", + id: "1", + isDAT: true, + isLPS: false, + isLoanToken: false, + name: "Playground BTC", + symbol: "BTC", + symbolKey: "BTC", + }, + { + id: "24", + amount: "10.00000000", + symbol: "TU10-DUSD", + symbolKey: "TU10-DUSD", + name: "Decentralized TU10-Decentralized USD", + isDAT: true, + isLPS: true, + isLoanToken: false, + displaySymbol: "dTU10-DUSD", + }, + ], + }, + }); + }); + + it("should display all tokens in dvm domain", () => { + cy.getByTestID("portfolio_row_1").should("exist"); + cy.getByTestID("portfolio_row_24").should("exist"); + }); + + it("should only display non LP tokens in evm domain", () => { + cy.getByTestID("domain_switch").click(); + cy.getByTestID("portfolio_row_1").should("exist"); + cy.getByTestID("portfolio_row_24").should("not.exist"); + }); + }, +); diff --git a/mobile-app/cypress/e2e/functional/wallet/portfolio/send.spec.ts b/mobile-app/cypress/e2e/functional/wallet/portfolio/send.spec.ts index e8831aba2c..cfaffcf72b 100644 --- a/mobile-app/cypress/e2e/functional/wallet/portfolio/send.spec.ts +++ b/mobile-app/cypress/e2e/functional/wallet/portfolio/send.spec.ts @@ -12,7 +12,7 @@ const validateAmountButtonResult = (value: string, usdValue: string): void => { }); cy.getByTestID("amount_input_in_usd").should( "have.text", - `$${usdValueWithThousandSep}` + `$${usdValueWithThousandSep}`, ); }; @@ -21,7 +21,7 @@ const validateInfotext = ( | "insufficient_balance" | "lp_warning" | "utxo_warning" - | "minimal_fee_warning" + | "minimal_fee_warning", ): void => { const infoText = { insufficient_balance: "Insufficient balance", @@ -86,7 +86,7 @@ context("Wallet - Send", () => { cy.getByTestID("amount_input").type("0.1"); cy.getByTestID("button_confirm_send_continue").should( "not.have.attr", - "disabled" + "disabled", ); cy.getByTestID("amount_input").clear(); @@ -94,17 +94,17 @@ context("Wallet - Send", () => { cy.getByTestID("address_input").type("z"); cy.getByTestID("address_error_text").should( "have.text", - "Invalid address. Make sure the address is correct to avoid irrecoverable losses" + "Invalid address. Make sure the address is correct to avoid irrecoverable losses", ); cy.getByTestID("button_confirm_send_continue").should( "have.attr", - "aria-disabled" + "aria-disabled", ); cy.wait(1000); cy.getByTestID("address_input_clear_button").click(); cy.getByTestID("button_confirm_send_continue").should( "have.attr", - "aria-disabled" + "aria-disabled", ); // Invalid amount - Character, over max amount, zero @@ -112,17 +112,17 @@ context("Wallet - Send", () => { cy.getByTestID("amount_input").clear().type("a"); cy.getByTestID("button_confirm_send_continue").should( "have.attr", - "aria-disabled" + "aria-disabled", ); cy.getByTestID("amount_input").clear().type("12"); cy.getByTestID("button_confirm_send_continue").should( "have.attr", - "aria-disabled" + "aria-disabled", ); cy.getByTestID("amount_input").clear().type("0"); cy.getByTestID("button_confirm_send_continue").should( "have.attr", - "aria-disabled" + "aria-disabled", ); }); @@ -133,7 +133,7 @@ context("Wallet - Send", () => { cy.getByTestID("token_search_input").clear().type("xxx").wait(2000); cy.getByTestID("empty_search_result_text").should( "have.text", - "Search results for “xxx”" + "Search results for “xxx”", ); cy.getByTestID("select_DFI").should("not.exist"); cy.getByTestID("select_dBTC-DFI").should("not.exist"); @@ -142,7 +142,7 @@ context("Wallet - Send", () => { cy.getByTestID("token_search_input").clear().type("btc").wait(2000); cy.getByTestID("empty_search_result_text").should( "have.text", - "Search results for “btc”" + "Search results for “btc”", ); cy.getByTestID("select_DFI").should("not.exist"); cy.getByTestID("select_dBTC-DFI").should("exist"); @@ -189,11 +189,11 @@ context("Wallet - Send", () => { cy.getByTestID(`${key}_amount_button`).click(); const availableBalance = new BigNumber(text); const inputAfterButtonPress = availableBalance.multipliedBy( - amountButtons[key] + amountButtons[key], ); validateAmountButtonResult( inputAfterButtonPress.toFixed(8), - inputAfterButtonPress.multipliedBy(10000).toFixed(2) + inputAfterButtonPress.multipliedBy(10000).toFixed(2), ); }); }); @@ -213,7 +213,7 @@ context("Wallet - Send", () => { cy.getByTestID("amount_input").clear().type(sendAmount); cy.getByTestID("button_confirm_send_continue").should( "not.have.attr", - "disabled" + "disabled", ); cy.getByTestID("button_confirm_send_continue").click(); // Check txn value @@ -222,14 +222,14 @@ context("Wallet - Send", () => { .then((textAmount) => { const amount = textAmount.replace(" DFI", ""); expect(new BigNumber(amount).toFixed(8)).eq( - new BigNumber(sendAmount).toFixed(8) + new BigNumber(sendAmount).toFixed(8), ); cy.getByTestID("text_fee") .invoke("text") .then((textFeeValue) => { const textFee = textFeeValue.replace(" DFI", ""); expect(new BigNumber(transactionFee).toFixed(8)).eq( - new BigNumber(textFee).toFixed(8) + new BigNumber(textFee).toFixed(8), ); // Check computed pending balance cy.getByTestID("resulting_DFI") @@ -237,14 +237,14 @@ context("Wallet - Send", () => { .then((pendingBalanceValue) => { const pendingBalance = pendingBalanceValue.replace( " DFI", - "" + "", ); expect( new BigNumber(balance) .plus(slippage) .minus(transactionFee) .minus(sendAmount) - .toFixed(8) + .toFixed(8), ).eq(pendingBalance); cy.getByTestID("button_cancel_send").click(); }); @@ -264,7 +264,7 @@ context("Wallet - Send", () => { cy.getByTestID("amount_input").clear().type("1"); cy.getByTestID("button_confirm_send_continue").should( "not.have.attr", - "disabled" + "disabled", ); cy.getByTestID("button_confirm_send_continue").click(); cy.getByTestID("confirm_title").contains("You are sending"); @@ -301,7 +301,7 @@ context("Wallet - Send", () => { cy.getByTestID("amount_input").clear().type(oldAmount); cy.getByTestID("button_confirm_send_continue").should( "not.have.attr", - "disabled" + "disabled", ); cy.getByTestID("button_confirm_send_continue").click(); @@ -309,7 +309,7 @@ context("Wallet - Send", () => { cy.getByTestID("confirm_title").contains("You are sending"); cy.getByTestID("text_send_amount").should( "have.text", - new BigNumber(oldAmount).toFixed(8) + new BigNumber(oldAmount).toFixed(8), ); // Address @@ -318,26 +318,26 @@ context("Wallet - Send", () => { // Transaction details cy.getByTestID("transaction_fee_label").should( "have.text", - "Transaction fee" + "Transaction fee", ); cy.getByTestID("transaction_fee_value").should("exist"); cy.getByTestID("text_amount_label").should("have.text", "Amount to send"); cy.getByTestID("text_amount").contains(oldAmount); const usdValueWithThousandSep = Number( - new BigNumber(oldAmount).multipliedBy(10000).toFixed(2) + new BigNumber(oldAmount).multipliedBy(10000).toFixed(2), ).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2, }); cy.getByTestID("text_amount_rhsUsdAmount").should( "have.text", - `$${usdValueWithThousandSep}` + `$${usdValueWithThousandSep}`, ); cy.getByTestID("button_confirm_send").click().wait(5000); // Check for authorization page description cy.getByTestID("txn_authorization_title").contains( - `Sending ${new BigNumber(oldAmount).toFixed(8)} DFI to ${oldAddress}` + `Sending ${new BigNumber(oldAmount).toFixed(8)} DFI to ${oldAddress}`, ); // Cancel send on authorisation page cy.getByTestID("cancel_authorization").click(); @@ -354,7 +354,7 @@ context("Wallet - Send", () => { cy.getByTestID("amount_input").clear().type(newAmount); cy.getByTestID("button_confirm_send_continue").should( "not.have.attr", - "disabled" + "disabled", ); cy.getByTestID("button_confirm_send_continue").click(); // Check address and amount in confirm send page @@ -364,7 +364,7 @@ context("Wallet - Send", () => { cy.getByTestID("button_confirm_send").click().wait(3000); // Check for authorization page description cy.getByTestID("txn_authorization_title").contains( - `Sending ${new BigNumber(newAmount).toFixed(8)} DFI to ${newAddress}` + `Sending ${new BigNumber(newAmount).toFixed(8)} DFI to ${newAddress}`, ); cy.closeOceanInterface(); }); @@ -404,7 +404,7 @@ context("Wallet - Send", () => { cy.getByTestID("button_confirm_send_continue").click(); cy.getByTestID("button_confirm_send").should( "have.attr", - "aria-disabled" + "aria-disabled", ); cy.getByTestID("lp_ack_switch").click(); cy.getByTestID("button_confirm_send").click().wait(3000); @@ -452,21 +452,21 @@ context("Wallet - Send - Max Values", () => { cy.getByTestID("MAX_amount_button").click(); cy.getByTestID("button_confirm_send_continue").should( "not.have.attr", - "disabled" + "disabled", ); cy.getByTestID("button_confirm_send_continue").click(); cy.getByTestID("confirm_title").contains("You are sending"); cy.getByTestID("text_send_amount").contains("9.90000000"); cy.getByTestID("text_amount").contains("9.90000000 DFI"); const usdValueWithThousandSep = Number( - new BigNumber(9.9).multipliedBy(10000).toFixed(2) + new BigNumber(9.9).multipliedBy(10000).toFixed(2), ).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2, }); cy.getByTestID("text_amount_rhsUsdAmount").should( "have.text", - `$${usdValueWithThousandSep}` + `$${usdValueWithThousandSep}`, ); cy.getByTestID("button_confirm_send").click().wait(3000); cy.closeOceanInterface(); @@ -516,40 +516,40 @@ context("Wallet - Send - with Conversion", () => { cy.getByTestID("amount_input").type("12"); cy.getByTestID("transaction_details_info_text").should( "contain", - "By continuing, the required amount of DFI will be converted" + "By continuing, the required amount of DFI will be converted", ); cy.getByTestID("button_confirm_send_continue").click(); cy.getByTestID("txn_authorization_title").contains( - `Convert ${new BigNumber("2.1").toFixed(8)} DFI to UTXO` + `Convert ${new BigNumber("2.1").toFixed(8)} DFI to UTXO`, ); cy.closeOceanInterface().wait(3000); cy.getByTestID("amount_to_convert_label").should( "have.text", - "Amount to convert" + "Amount to convert", ); cy.getByTestID("amount_to_convert_value").should( "contain", - "2.10000000 DFI" + "2.10000000 DFI", ); cy.getByTestID("conversion_status").should("have.text", "Converted"); cy.getByTestID("transaction_fee_label").should( "have.text", - "Transaction fee" + "Transaction fee", ); cy.getByTestID("transaction_fee_value").should("exist"); cy.getByTestID("text_amount").should("have.text", "12.00000000 DFI"); const usdValueWithThousandSep = Number( - new BigNumber(12).multipliedBy(10000).toFixed(2) + new BigNumber(12).multipliedBy(10000).toFixed(2), ).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2, }); cy.getByTestID("text_amount_rhsUsdAmount").should( "have.text", - `$${usdValueWithThousandSep}` + `$${usdValueWithThousandSep}`, ); cy.getByTestID("text_send_amount").should("contain", "12.00000000"); @@ -584,7 +584,7 @@ context("Wallet - Send - Switch token", () => { cy.getByTestID("select_DFI").click(); cy.getByTestID("button_confirm_send_continue").should( "have.attr", - "aria-disabled" + "aria-disabled", ); cy.getByTestID("max_value").should("have.text", "19.90000000"); cy.getByTestID("max_value_display_symbol").contains("DFI"); @@ -598,7 +598,7 @@ context("Wallet - Send - Switch token", () => { cy.getByTestID("max_value_display_symbol").contains("dBTC"); cy.getByTestID("button_confirm_send_continue").should( "have.attr", - "aria-disabled" + "aria-disabled", ); }); @@ -661,10 +661,10 @@ context("Wallet - Send - Address book", () => { cy.getByTestID("address_input_clear_button").click(); cy.getByTestID("address_book_button").click(); cy.getByTestID(`address_row_label_${index}_WHITELISTED`).contains( - labels[index] + labels[index], ); cy.getByTestID(`address_row_text_${index}_WHITELISTED`).contains( - addresses[index] + addresses[index], ); // cy.getByTestID('address_book_address_input').clear().type(addresses[index]).blur() }); @@ -704,15 +704,15 @@ context("Wallet - Send - Address book", () => { cy.getByTestID("address_book_address_input").type("fake address"); cy.getByTestID("save_address_label").should("have.attr", "aria-disabled"); cy.getByTestID("address_book_address_input_error").contains( - "Please enter a valid address" + "Please enter a valid address", ); cy.getByTestID("address_book_label_input_clear_button").click(); cy.getByTestID("address_book_label_input_error").contains( - "Required field. Please enter a label. Maximum of 40 characters." + "Required field. Please enter a label. Maximum of 40 characters.", ); cy.getByTestID("address_book_address_input").clear(); cy.getByTestID("address_book_address_input_error").contains( - "Please enter a valid address" + "Please enter a valid address", ); cy.getByTestID("save_address_label").should("have.attr", "aria-disabled"); }); @@ -758,7 +758,7 @@ context("Wallet - Send - Address book", () => { .type(addresses[index]) .blur(); cy.getByTestID("address_book_address_input_error").contains( - "This address already exists in your address book, please enter a different address" + "This address already exists in your address book, please enter a different address", ); cy.go("back"); }); @@ -776,7 +776,7 @@ context("Wallet - Send - Address book", () => { .type(walletAddress) .blur(); cy.getByTestID("address_book_address_input_error").contains( - "This address already exists in your address book, please enter a different address" + "This address already exists in your address book, please enter a different address", ); }); }); @@ -804,7 +804,7 @@ context("Wallet - Send - Address book", () => { .should("exist") .then(() => { const walletUserPreference = JSON.parse( - localStorage.getItem("Local.WALLET.SETTINGS") ?? "{}" + localStorage.getItem("Local.WALLET.SETTINGS") ?? "{}", ); expect(walletUserPreference).to.have.deep.property("addressBook", {}); }); @@ -827,9 +827,207 @@ context("Wallet - Send - Address book", () => { .should("exist") .then(() => { const walletUserPreference = JSON.parse( - localStorage.getItem("Local.WALLET.SETTINGS") ?? "{}" + localStorage.getItem("Local.WALLET.SETTINGS") ?? "{}", ); expect(walletUserPreference).to.have.deep.property("addressBook", {}); }); }); }); + +context.only("(dvm -> dvm) Wallet - Send - Address book", () => { + before(() => { + cy.createEmptyWallet(true); + cy.sendDFItoWallet().sendDFITokentoWallet().wait(6000); + cy.getByTestID("bottom_tab_portfolio").click(); + + // Portfolio -> Send action btn -> Address book + cy.getByTestID("action_button_group").should("exist"); + cy.getByTestID("send_balance_button").click().wait(3000); + cy.getByTestID("select_DFI").click().wait(3000); + cy.getByTestID("address_book_button").click(); + cy.getByTestID("address_row_0_WHITELISTED").should("not.exist"); + cy.getByTestID("button_add_address").should("exist"); + }); + + const labels = ["DVMAddress", "EVMAddress"]; + const addresses = [ + "bcrt1q8rfsfny80jx78cmk4rsa069e2ckp6rn83u6ut9", + "0x2DeC425BF3c289C9B7452aD54E2F9877F21e0316", + ]; + + function validateMatchAddress(address: string, label: string): void { + cy.getByTestID("address_input").contains(address); + if (label === labels[0]) { + cy.getByTestID("address_input_footer").contains(label); + } else { + cy.getByTestID("address_input_footer_evm").contains(label); + } + } + + function populateAddressBook(): void { + cy.createEmptyWallet(true); + cy.sendDFItoWallet().sendDFITokentoWallet().wait(6000); + cy.getByTestID("action_button_group").should("exist"); + cy.getByTestID("send_balance_button").click().wait(3000); + cy.getByTestID("select_DFI").click().wait(3000); + cy.getByTestID("address_book_button").click(); + cy.wrap(labels).each((_v, index: number) => { + if (index === 0) { + cy.getByTestID("button_add_address").click(); + } else { + cy.getByTestID("add_new_address").click(); + } + // Select EVM address type + if (index === 1) { + cy.getByTestID("address_book_address_type_EVM").click(); + } + cy.getByTestID("address_book_label_input").type(labels[index]); + cy.getByTestID("address_book_label_input_error").should("not.exist"); + cy.getByTestID("address_book_address_input") + .clear() + .type(addresses[index]) + .blur(); + cy.getByTestID("address_book_address_input_error").should("not.exist"); + cy.getByTestID("save_address_label").click().wait(1000); + cy.getByTestID("pin_authorize").type("000000").wait(2000); + validateMatchAddress(addresses[index], labels[index]); + cy.wait(1000); + cy.getByTestID("address_input_clear_button").click(); + cy.getByTestID("address_book_button").click(); + cy.getByTestID(`address_row_label_${index}_WHITELISTED`).contains( + labels[index], + ); + cy.getByTestID(`address_row_text_${index}_WHITELISTED`).contains( + addresses[index], + ); + // cy.getByTestID('address_book_address_input').clear().type(addresses[index]).blur() + }); + } + + it("should enable selection for both DVM and EVM whitelisted wallet addresses", () => { + populateAddressBook(); + + // check if cards are enabled + cy.getByTestID("address_row_0_WHITELISTED").should( + "not.have.attr", + "aria-disabled", + ); + cy.getByTestID("address_row_1_WHITELISTED").should( + "not.have.attr", + "aria-disabled", + ); + }); + + it.only("should display evm tag when EVM address is selected in DVM domain", () => { + populateAddressBook(); + cy.getByTestID("address_row_text_1_WHITELISTED").click(); + + // expect to see evm tag in address input + cy.getByTestID("address_input_footer_evm").contains(labels[1]); + + cy.getByTestID("amount_input").type("0.1"); + cy.getByTestID("button_confirm_send_continue").click(); + + // expect to see evm tag in confirm screen + cy.getByTestID("to_address_label_evm_tag").should("exist"); + }); +}); + +context("(evm -> dvm) Wallet - Send - Address book", () => { + const isEvmDomain = true; + before(() => { + cy.createEmptyWallet(true); + cy.sendDFItoWallet().sendDFITokentoWallet().wait(6000); + cy.getByTestID("bottom_tab_portfolio").click(); + + // Portfolio -> Send btn -> Address book + cy.getByTestID("action_button_group").should("exist"); + cy.getByTestID("send_balance_button").click().wait(3000); + cy.getByTestID("select_DFI").click().wait(3000); + cy.getByTestID("address_book_button").click(); + cy.getByTestID("address_row_0_WHITELISTED").should("not.exist"); + cy.getByTestID("button_add_address").should("exist"); + }); + + const labels = ["DVMAddress", "EVMAddress"]; + const addresses = [ + "bcrt1q8rfsfny80jx78cmk4rsa069e2ckp6rn83u6ut9", + "0x2DeC425BF3c289C9B7452aD54E2F9877F21e0316", + ]; + + function validateMatchAddress(address: string, label: string): void { + cy.getByTestID("address_input").contains(address); + if (label === labels[0]) { + cy.getByTestID("address_input_footer").contains(label); + } else { + cy.getByTestID("address_input_footer_evm").contains(label); + } + } + + function populateAddressBook(): void { + cy.createEmptyWallet(true); + cy.getByTestID("domain_switch").click(); // Switch to EVM domain + cy.sendDFItoWallet().sendDFITokentoWallet().wait(6000); + cy.getByTestID("action_button_group").should("exist"); + cy.getByTestID("send_balance_button").click().wait(3000); + cy.getByTestID("select_DFI").click().wait(3000); + cy.getByTestID("address_book_button").click(); + cy.wrap(labels).each((_v, index: number) => { + if (index === 0) { + cy.getByTestID("button_add_address").click(); + } else { + cy.getByTestID("add_new_address").click(); + } + if (isEvmDomain && index === 0) { + cy.getByTestID("address_book_address_type_DVM").click(); + } + cy.getByTestID("address_book_label_input").type(labels[index]); + cy.getByTestID("address_book_label_input_error").should("not.exist"); + cy.getByTestID("address_book_address_input") + .clear() + .type(addresses[index]) + .blur(); + cy.getByTestID("address_book_address_input_error").should("not.exist"); + cy.getByTestID("save_address_label").click().wait(1000); + cy.getByTestID("pin_authorize").type("000000").wait(2000); + validateMatchAddress(addresses[index], labels[index]); + cy.wait(1000); + cy.getByTestID("address_input_clear_button").click(); + cy.getByTestID("address_book_button").click(); + + // Skip test below since the order of address is rearranged + if (isEvmDomain && index === 1) { + return; + } + cy.getByTestID(`address_row_label_${index}_WHITELISTED`).contains( + labels[index], + ); + cy.getByTestID(`address_row_text_${index}_WHITELISTED`).contains( + addresses[index], + ); + + // cy.getByTestID('address_book_address_input').clear().type(addresses[index]).blur() + }); + } + + it("should enable selection only for DVM whitelisted wallet addresses in EVM domain", () => { + populateAddressBook(); + + // EVM address + cy.getByTestID("address_row_label_0_WHITELISTED").contains(labels[1]); + cy.getByTestID("address_row_text_0_WHITELISTED").contains(addresses[1]); + cy.getByTestID("address_row_0_WHITELISTED").should( + "have.attr", + "aria-disabled", + ); + + // DVM address + cy.getByTestID("address_row_label_1_WHITELISTED").contains(labels[0]); + cy.getByTestID("address_row_text_1_WHITELISTED").contains(addresses[0]); + cy.getByTestID("address_row_label_0_WHITELISTED_EVM_tag").should("exist"); + cy.getByTestID("address_row_1_WHITELISTED").should( + "not.have.attr", + "aria-disabled", + ); + }); +}); diff --git a/package-lock.json b/package-lock.json index b3f72cddd3..43de3840f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "@react-navigation/stack": "^6.3.17", "@reduxjs/toolkit": "^1.9.5", "@shopify/flash-list": "1.4.3", - "@waveshq/standard-defichain-jellyfishsdk": "^2.2.0", + "@waveshq/standard-defichain-jellyfishsdk": "^2.4.1", "@waveshq/walletkit-core": "^1.3.5", "@waveshq/walletkit-ui": "^1.3.5", "bignumber.js": "^9.1.1", @@ -36212,39 +36212,39 @@ } }, "@defichain/jellyfish-address": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-address/-/jellyfish-address-4.0.0-beta.10.tgz", - "integrity": "sha512-9UXUNs6Y6n9p6/19GxVls1MbVsf5F32BscfhR3Z6VE7rtNnAaq4WSSBDZ3dTObRImgcz3fsXIcCbM/smUuWCLw==", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-address/-/jellyfish-address-4.0.0-beta.11.tgz", + "integrity": "sha512-PQzA4+hqvKI8sUCrYkzjOJir83KKS8tpMJs53BwO+Wrh2RA47hs9pBWAYgihNbKesQenYyBe7rKJ3rvInp8MKA==", "requires": { - "@defichain/jellyfish-crypto": "4.0.0-beta.10", - "@defichain/jellyfish-network": "4.0.0-beta.10", - "@defichain/jellyfish-transaction": "4.0.0-beta.10", + "@defichain/jellyfish-crypto": "4.0.0-beta.11", + "@defichain/jellyfish-network": "4.0.0-beta.11", + "@defichain/jellyfish-transaction": "4.0.0-beta.11", "bech32": "^2.0.0", "bs58": "^4.0.1" } }, "@defichain/jellyfish-api-core": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-api-core/-/jellyfish-api-core-4.0.0-beta.10.tgz", - "integrity": "sha512-YhG1934sBkldIwmmw2h5UAVacHueEethwUL9m1tf2r5AXCl7DY47DOEyQR1ZatKEKifgH1bQu8+llYUo2eSCIQ==", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-api-core/-/jellyfish-api-core-4.0.0-beta.11.tgz", + "integrity": "sha512-WUcy6LmE31ZpbH60TTv75oRrWLplCH5wLffWiVSelCCF2ZXGJ7jv4pebT2jRhmQYnrLy2S6M3KXMeLwNG8X4mw==", "requires": { - "@defichain/jellyfish-json": "4.0.0-beta.10" + "@defichain/jellyfish-json": "4.0.0-beta.11" } }, "@defichain/jellyfish-api-jsonrpc": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-api-jsonrpc/-/jellyfish-api-jsonrpc-4.0.0-beta.10.tgz", - "integrity": "sha512-FyBN+crA0vz4R3q3QH3gyEAvsSwk7zzyPbEpkTgxHIyC55p1fzyhxlLMABnvneaWzAgjxvxYVvcbooZFDAoZvg==", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-api-jsonrpc/-/jellyfish-api-jsonrpc-4.0.0-beta.11.tgz", + "integrity": "sha512-nRuuYsUCUGwpZAMkjKL/Dppqfcydi5AtzdT0ndwuh1NvtQYBrIdc7QqpmcysAjR99qqMZUGTScd5Y4oVdxVAsg==", "requires": { - "@defichain/jellyfish-api-core": "4.0.0-beta.10", + "@defichain/jellyfish-api-core": "4.0.0-beta.11", "abort-controller": "^3.0.0", "cross-fetch": "^3.1.5" } }, "@defichain/jellyfish-buffer": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-buffer/-/jellyfish-buffer-4.0.0-beta.10.tgz", - "integrity": "sha512-gnEbvZxuPKQpFXjaqdyNWEz3Cw4ngfA4LD66wVrPPu83F7BEITLQLHFXY9CjSeky26cOwSlWFic1RlT4UXXjBg==", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-buffer/-/jellyfish-buffer-4.0.0-beta.11.tgz", + "integrity": "sha512-nwcNJOS7WmaJ5FtGRgCXtFv/+dQ+EckdZTF7rAyn8DohTtbNC6oLYImbYr0UWLYGGq/CmDSEW8sxuuVf1V6ZiQ==", "requires": { "bignumber.js": "^9.0.2", "bn.js": "^5.2.1", @@ -36252,9 +36252,9 @@ } }, "@defichain/jellyfish-crypto": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-crypto/-/jellyfish-crypto-4.0.0-beta.10.tgz", - "integrity": "sha512-jouoUIlYwHy7Qcq+vTK4qxi7sZ3XPUmfHfgx2oBA9MA0BNI7yc+TgXtfsGivkrZNSfI2IWuF2CbT5AqWck+pwQ==", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-crypto/-/jellyfish-crypto-4.0.0-beta.11.tgz", + "integrity": "sha512-b0DszcL5gmnFve+PrPaH5ibQ00ynIeYYmxa0ZIqPX0Xol3NV4drNhFgyd/YevJihNFCZ6Y0AdqWmFSnjdy4XCQ==", "requires": { "bech32": "^2.0.0", "bip66": "^1.1.5", @@ -36268,9 +36268,9 @@ } }, "@defichain/jellyfish-json": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-json/-/jellyfish-json-4.0.0-beta.10.tgz", - "integrity": "sha512-MePFrdoMB21D2V4Xp6Qa+RDxvemFvzIvXnwgA2/ICIvVPDrOZO98bcTMfcQZQlIYIf78HF0+xkvLZoZV+NGTJQ==", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-json/-/jellyfish-json-4.0.0-beta.11.tgz", + "integrity": "sha512-XXrKAp5774HjOPb6NYnPc3475m4s4NlPRLZ+ivi8+mR+/nnI097OSapx0f4HJ58GLZckHxeO/fO1HqrA41YI4w==", "requires": { "@types/lossless-json": "^1.0.1", "bignumber.js": "^9.0.2", @@ -36278,92 +36278,92 @@ } }, "@defichain/jellyfish-network": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-network/-/jellyfish-network-4.0.0-beta.10.tgz", - "integrity": "sha512-iGdarmM7WAENUNZlC+yzwsdoJZ/eIvsGhDi/SprbB2+4fL3inolvHq1HDaN6+JF2qAGIR8CqJL6XOeWPbHq6ZA==", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-network/-/jellyfish-network-4.0.0-beta.11.tgz", + "integrity": "sha512-oexdZkc6DSRzS1DVNh3br6ySgJa/y8hCfsa/IKXRQ+iwQsJsrnDlcmUNPvN1IHCWP9OiHY6HOpl3XRsRHothQg==", "requires": { "bignumber.js": "^9.0.2" } }, "@defichain/jellyfish-testing": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-testing/-/jellyfish-testing-4.0.0-beta.10.tgz", - "integrity": "sha512-1ZJp6Jn4TXfuNq0ZDoHQMzr88wxEi2v+1S9X9fzx6lOMtNEnzZ8zRa/k+Dlf/tUdDioQCvUTM9CpFEPocZMfVA==", - "requires": { - "@defichain/jellyfish-api-jsonrpc": "4.0.0-beta.10", - "@defichain/jellyfish-crypto": "4.0.0-beta.10", - "@defichain/jellyfish-network": "4.0.0-beta.10", - "@defichain/testcontainers": "4.0.0-beta.10", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-testing/-/jellyfish-testing-4.0.0-beta.11.tgz", + "integrity": "sha512-CNZ30CdmoIWgcIi5Ld6kMil3NnXRu4y37dvYF9xwmOila8FpS+6dJAWEQ+9VohcFn9YRgP3kAz4DjYcufkpLhA==", + "requires": { + "@defichain/jellyfish-api-jsonrpc": "4.0.0-beta.11", + "@defichain/jellyfish-crypto": "4.0.0-beta.11", + "@defichain/jellyfish-network": "4.0.0-beta.11", + "@defichain/testcontainers": "4.0.0-beta.11", "cross-fetch": "^3.1.5" } }, "@defichain/jellyfish-transaction": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction/-/jellyfish-transaction-4.0.0-beta.10.tgz", - "integrity": "sha512-g9bmNEIVolfL4VdDsNDkACej2XmYYW3Uod4ogi/Y9Yq8MYfhAVLAHIhuASXQ0q1x7g0sAOHWdPK4T3eX4mUVGQ==", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction/-/jellyfish-transaction-4.0.0-beta.11.tgz", + "integrity": "sha512-m+B/C7co7q2Ygr3Eg5KF7DK4gcEI9IvP/nXwzcSGjYUjXqiQ6szedJ7ybvMFRfZRofhBfAguz8KvvQODa7LsNQ==", "requires": { - "@defichain/jellyfish-buffer": "4.0.0-beta.10", - "@defichain/jellyfish-crypto": "4.0.0-beta.10" + "@defichain/jellyfish-buffer": "4.0.0-beta.11", + "@defichain/jellyfish-crypto": "4.0.0-beta.11" } }, "@defichain/jellyfish-transaction-builder": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction-builder/-/jellyfish-transaction-builder-4.0.0-beta.10.tgz", - "integrity": "sha512-x0QoVultE1nLW8hYH2oVGuGA0mfdmKgiSVaaQaHRsIeBa4uMRfkVkaANaJmHlgTYtZjoUbQoKTXA5W6PGjtkXA==", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction-builder/-/jellyfish-transaction-builder-4.0.0-beta.11.tgz", + "integrity": "sha512-8aK2lRO367ustY8uAPm6pgrhzq4//btXtP8MqBnQuEE92kvBkjXlI8UJ1bSK4su+L3xOPYJFFkwt0QPHKAp0VQ==", "requires": { - "@defichain/jellyfish-crypto": "4.0.0-beta.10", - "@defichain/jellyfish-transaction": "4.0.0-beta.10", - "@defichain/jellyfish-transaction-signature": "4.0.0-beta.10" + "@defichain/jellyfish-crypto": "4.0.0-beta.11", + "@defichain/jellyfish-transaction": "4.0.0-beta.11", + "@defichain/jellyfish-transaction-signature": "4.0.0-beta.11" } }, "@defichain/jellyfish-transaction-signature": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction-signature/-/jellyfish-transaction-signature-4.0.0-beta.10.tgz", - "integrity": "sha512-qRUdOiN0W+LgIMG/+Y3hLaUQKutxUu1jWqA9thBubt0Tx9Ve5TtpkJhVw9bMw8lW3eSRfh3iSd7sB25mDMa7yA==", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction-signature/-/jellyfish-transaction-signature-4.0.0-beta.11.tgz", + "integrity": "sha512-p/bXAhpyGbFiOXD8tjXniREpAIUBE3NGu3N65foib9EuQk1AkNnQnAxJ6VZogW0J+O4PsN03Gbg50ySSto3SPg==", "requires": { - "@defichain/jellyfish-buffer": "4.0.0-beta.10", - "@defichain/jellyfish-crypto": "4.0.0-beta.10", - "@defichain/jellyfish-transaction": "4.0.0-beta.10" + "@defichain/jellyfish-buffer": "4.0.0-beta.11", + "@defichain/jellyfish-crypto": "4.0.0-beta.11", + "@defichain/jellyfish-transaction": "4.0.0-beta.11" } }, "@defichain/jellyfish-wallet": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-wallet/-/jellyfish-wallet-4.0.0-beta.10.tgz", - "integrity": "sha512-UtPryqcMSgCjExyBVVU5dhpi6And91goV4+wEo5wCQqrqAmn0Zo02k3XJ8DNaVqEJfGYpEbPBSdsIJMiO9YTfw==", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-wallet/-/jellyfish-wallet-4.0.0-beta.11.tgz", + "integrity": "sha512-wxsvvixbY5nw2t0moyQJ0a454yb7mwMGbjG5kwr02/AarHj2eHpTDXJOYG7cbYM5e/lJ8KhzcWhyLjqlc7K8qg==", "requires": { - "@defichain/jellyfish-address": "4.0.0-beta.10", - "@defichain/jellyfish-crypto": "4.0.0-beta.10", - "@defichain/jellyfish-network": "4.0.0-beta.10", - "@defichain/jellyfish-transaction": "4.0.0-beta.10", - "@defichain/jellyfish-transaction-builder": "4.0.0-beta.10", - "@defichain/jellyfish-transaction-signature": "4.0.0-beta.10" + "@defichain/jellyfish-address": "4.0.0-beta.11", + "@defichain/jellyfish-crypto": "4.0.0-beta.11", + "@defichain/jellyfish-network": "4.0.0-beta.11", + "@defichain/jellyfish-transaction": "4.0.0-beta.11", + "@defichain/jellyfish-transaction-builder": "4.0.0-beta.11", + "@defichain/jellyfish-transaction-signature": "4.0.0-beta.11" } }, "@defichain/jellyfish-wallet-encrypted": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-wallet-encrypted/-/jellyfish-wallet-encrypted-4.0.0-beta.10.tgz", - "integrity": "sha512-BCSCOTGKgsiVUdsJs1kJVXZPkGOOx3bzi25zyPE5oZ3j+75Kqza9CrIhSi0b8zKnvUg+rABw9WvUZBksUlRqkw==", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-wallet-encrypted/-/jellyfish-wallet-encrypted-4.0.0-beta.11.tgz", + "integrity": "sha512-MLA/a28zGq+IRNd6M1dpecOIOINpHqvkzdj6+b+b+K7DJW8CcB+9FPcTEGkluf8LXall+EslOecZtF47G9K/GQ==", "requires": { - "@defichain/jellyfish-wallet-mnemonic": "4.0.0-beta.10", + "@defichain/jellyfish-wallet-mnemonic": "4.0.0-beta.11", "scrypt-js": "^3.0.1" } }, "@defichain/jellyfish-wallet-mnemonic": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-wallet-mnemonic/-/jellyfish-wallet-mnemonic-4.0.0-beta.10.tgz", - "integrity": "sha512-hsPh2431chj7sFBe3uYMWA3cTw0Q9RIe+J9LurkmbByn/1aXzDiFRIpOUt2a3mR7OCDIahXCwCzGzRILISFxpQ==", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-wallet-mnemonic/-/jellyfish-wallet-mnemonic-4.0.0-beta.11.tgz", + "integrity": "sha512-zBSsJv6aTtS+DZLjjsXaX+IAVaoDE4hk7J49pHIbWQSUat23sYnA4kCox4TqcSKMbgB7drXBLY4HBwxeZQX3XA==", "requires": { - "@defichain/jellyfish-transaction": "4.0.0-beta.10", - "@defichain/jellyfish-wallet": "4.0.0-beta.10", + "@defichain/jellyfish-transaction": "4.0.0-beta.11", + "@defichain/jellyfish-wallet": "4.0.0-beta.11", "bip32": "^2.0.6", "bip39": "^3.0.4", "create-hmac": "^1.1.7" } }, "@defichain/ocean-api-client": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/ocean-api-client/-/ocean-api-client-4.0.0-beta.10.tgz", - "integrity": "sha512-sV8FLmbD6R0vQsUTZ9ozxbC2CAvGEJmVY2gDjGZjOW3doS2LbtOOqrI3wFDmlomRrfMWiVh/ENqN/ncJw6V0Sg==", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@defichain/ocean-api-client/-/ocean-api-client-4.0.0-beta.11.tgz", + "integrity": "sha512-CR/N2lUfa59IJNdT/PX9Vk9dLO5zFEezmGp2SDdPs4sIfjUl9UQ5VXQyvfW0WUpPkgVC2QILj2KnG31sk/CdAQ==", "requires": { "abort-controller": "^3.0.0", "cross-fetch": "^3.1.5", @@ -36371,20 +36371,20 @@ } }, "@defichain/playground-api-client": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/playground-api-client/-/playground-api-client-4.0.0-beta.10.tgz", - "integrity": "sha512-e7YdLbAwxVI3kDH21yxIta08KwKKYqCMvQJSH1qwm5xZMyMNkB2aiUjXxgDjAMUZ/h+cbFfrloqtsGkDlpPTog==", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@defichain/playground-api-client/-/playground-api-client-4.0.0-beta.11.tgz", + "integrity": "sha512-bA2JfCqWca11gzo+moHjiRrd9WRfFSR87rf8WUrWIgtSks/N5A8PgV56iYqVm/KUXQwC6L1thhxpyDgYXS2V2w==", "requires": { - "@defichain/jellyfish-api-core": "4.0.0-beta.10", - "@defichain/ocean-api-client": "4.0.0-beta.10" + "@defichain/jellyfish-api-core": "4.0.0-beta.11", + "@defichain/ocean-api-client": "4.0.0-beta.11" } }, "@defichain/testcontainers": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/testcontainers/-/testcontainers-4.0.0-beta.10.tgz", - "integrity": "sha512-uymLLU5P+IY6WkGxQWr+ns8D6k+BGnuJT4Q76oJlpl2TpIl897MoQj/MR+QPqtTQPb9YVOUsTiXo9iULChSWHA==", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@defichain/testcontainers/-/testcontainers-4.0.0-beta.11.tgz", + "integrity": "sha512-XjdlF5GxTcIe/wTjZiFuEPwAVm7Q1hcQVRPC9RcE0qY4xqXy2yay+C1CUTgzRZPTHIx39Cl4prDVskm8fkzNZQ==", "requires": { - "@defichain/jellyfish-network": "4.0.0-beta.10", + "@defichain/jellyfish-network": "4.0.0-beta.11", "cross-fetch": "^3.1.5", "dockerode": "^3.3.5", "tar-fs": "^2.1.1", @@ -36393,25 +36393,25 @@ } }, "@defichain/whale-api-client": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/whale-api-client/-/whale-api-client-4.0.0-beta.10.tgz", - "integrity": "sha512-4r5DKCAlHNlqv/o0HcdhRhND3HJ7qiNF5n1lGC+P3SLc9Gw6tejKwbiVVN8sakXporJwb5UUM/GRDXRHlq/mTQ==", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@defichain/whale-api-client/-/whale-api-client-4.0.0-beta.11.tgz", + "integrity": "sha512-0pIQ9TdzfhvSYAv1OU+ffTHdSj1q6migLH6n5OtW5Dkqmg5gIt+ORu9+oX1F3AuotV47wnf64SiLQFdbXECq/g==", "requires": { - "@defichain/jellyfish-api-core": "4.0.0-beta.10", - "@defichain/jellyfish-api-jsonrpc": "4.0.0-beta.10", + "@defichain/jellyfish-api-core": "4.0.0-beta.11", + "@defichain/jellyfish-api-jsonrpc": "4.0.0-beta.11", "abort-controller": "^3.0.0", "cross-fetch": "^3.1.5", "url-search-params-polyfill": "8.1.1" } }, "@defichain/whale-api-wallet": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@defichain/whale-api-wallet/-/whale-api-wallet-4.0.0-beta.10.tgz", - "integrity": "sha512-SRthiQnd/oichvZ+eN9VgAJJrooEYv0ROZ7bHYfmGKM/wBfeoTP5JLoKYA28pUNCnMCaGtTNssUABFBuR9yICA==", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@defichain/whale-api-wallet/-/whale-api-wallet-4.0.0-beta.11.tgz", + "integrity": "sha512-pK2sHE2dmTrlMROT8O60aKKPDWM3C0X/usdJaltO6SPORx1uaBUnWa79/fuMO9s3TpzGLn9GmdE11iBqQb8ykA==", "requires": { - "@defichain/jellyfish-transaction-builder": "4.0.0-beta.10", - "@defichain/jellyfish-wallet": "4.0.0-beta.10", - "@defichain/whale-api-client": "4.0.0-beta.10" + "@defichain/jellyfish-transaction-builder": "4.0.0-beta.11", + "@defichain/jellyfish-wallet": "4.0.0-beta.11", + "@defichain/whale-api-client": "4.0.0-beta.11" } }, "@egjs/hammerjs": { @@ -39113,6 +39113,54 @@ "integrity": "sha512-vv1qrjXeGbuF2mOkhkdxMDtv9np7W4mcBtaDnHU+yJG+bBwa6rYsYSCI/9Xm5+TuF5SbZbrWO6G1NfTh1TMjvQ==", "optional": true }, + "@next/swc-darwin-x64": { + "version": "13.4.19", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.19.tgz", + "integrity": "sha512-jyzO6wwYhx6F+7gD8ddZfuqO4TtpJdw3wyOduR4fxTUCm3aLw7YmHGYNjS0xRSYGAkLpBkH1E0RcelyId6lNsw==", + "optional": true + }, + "@next/swc-linux-arm64-gnu": { + "version": "13.4.19", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.4.19.tgz", + "integrity": "sha512-vdlnIlaAEh6H+G6HrKZB9c2zJKnpPVKnA6LBwjwT2BTjxI7e0Hx30+FoWCgi50e+YO49p6oPOtesP9mXDRiiUg==", + "optional": true + }, + "@next/swc-linux-arm64-musl": { + "version": "13.4.19", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.4.19.tgz", + "integrity": "sha512-aU0HkH2XPgxqrbNRBFb3si9Ahu/CpaR5RPmN2s9GiM9qJCiBBlZtRTiEca+DC+xRPyCThTtWYgxjWHgU7ZkyvA==", + "optional": true + }, + "@next/swc-linux-x64-gnu": { + "version": "13.4.19", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.4.19.tgz", + "integrity": "sha512-htwOEagMa/CXNykFFeAHHvMJeqZfNQEoQvHfsA4wgg5QqGNqD5soeCer4oGlCol6NGUxknrQO6VEustcv+Md+g==", + "optional": true + }, + "@next/swc-linux-x64-musl": { + "version": "13.4.19", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.4.19.tgz", + "integrity": "sha512-4Gj4vvtbK1JH8ApWTT214b3GwUh9EKKQjY41hH/t+u55Knxi/0wesMzwQRhppK6Ddalhu0TEttbiJ+wRcoEj5Q==", + "optional": true + }, + "@next/swc-win32-arm64-msvc": { + "version": "13.4.19", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.4.19.tgz", + "integrity": "sha512-bUfDevQK4NsIAHXs3/JNgnvEY+LRyneDN788W2NYiRIIzmILjba7LaQTfihuFawZDhRtkYCv3JDC3B4TwnmRJw==", + "optional": true + }, + "@next/swc-win32-ia32-msvc": { + "version": "13.4.19", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.4.19.tgz", + "integrity": "sha512-Y5kikILFAr81LYIFaw6j/NrOtmiM4Sf3GtOc0pn50ez2GCkr+oejYuKGcwAwq3jiTKuzF6OF4iT2INPoxRycEA==", + "optional": true + }, + "@next/swc-win32-x64-msvc": { + "version": "13.4.19", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.4.19.tgz", + "integrity": "sha512-YzA78jBDXMYiINdPdJJwGgPNT3YqBNNGhsthsDoWHL9p24tEJn9ViQf/ZqTbwSpX/RrkPupLfuuTH2sf73JBAw==", + "optional": true + }, "@noble/hashes": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", @@ -39204,12 +39252,60 @@ } } }, + "@parcel/watcher-android-arm64": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.3.0.tgz", + "integrity": "sha512-f4o9eA3dgk0XRT3XhB0UWpWpLnKgrh1IwNJKJ7UJek7eTYccQ8LR7XUWFKqw6aEq5KUNlCcGvSzKqSX/vtWVVA==", + "optional": true + }, "@parcel/watcher-darwin-arm64": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.3.0.tgz", "integrity": "sha512-mKY+oijI4ahBMc/GygVGvEdOq0L4DxhYgwQqYAz/7yPzuGi79oXrZG52WdpGA1wLBPrYb0T8uBaGFo7I6rvSKw==", "optional": true }, + "@parcel/watcher-darwin-x64": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.3.0.tgz", + "integrity": "sha512-20oBj8LcEOnLE3mgpy6zuOq8AplPu9NcSSSfyVKgfOhNAc4eF4ob3ldj0xWjGGbOF7Dcy1Tvm6ytvgdjlfUeow==", + "optional": true + }, + "@parcel/watcher-freebsd-x64": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.3.0.tgz", + "integrity": "sha512-7LftKlaHunueAEiojhCn+Ef2CTXWsLgTl4hq0pkhkTBFI3ssj2bJXmH2L67mKpiAD5dz66JYk4zS66qzdnIOgw==", + "optional": true + }, + "@parcel/watcher-linux-arm-glibc": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.3.0.tgz", + "integrity": "sha512-1apPw5cD2xBv1XIHPUlq0cO6iAaEUQ3BcY0ysSyD9Kuyw4MoWm1DV+W9mneWI+1g6OeP6dhikiFE6BlU+AToTQ==", + "optional": true + }, + "@parcel/watcher-linux-arm64-glibc": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.3.0.tgz", + "integrity": "sha512-mQ0gBSQEiq1k/MMkgcSB0Ic47UORZBmWoAWlMrTW6nbAGoLZP+h7AtUM7H3oDu34TBFFvjy4JCGP43JlylkTQA==", + "optional": true + }, + "@parcel/watcher-linux-arm64-musl": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.3.0.tgz", + "integrity": "sha512-LXZAExpepJew0Gp8ZkJ+xDZaTQjLHv48h0p0Vw2VMFQ8A+RKrAvpFuPVCVwKJCr5SE+zvaG+Etg56qXvTDIedw==", + "optional": true + }, + "@parcel/watcher-linux-x64-glibc": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.3.0.tgz", + "integrity": "sha512-P7Wo91lKSeSgMTtG7CnBS6WrA5otr1K7shhSjKHNePVmfBHDoAOHYRXgUmhiNfbcGk0uMCHVcdbfxtuiZCHVow==", + "optional": true + }, + "@parcel/watcher-linux-x64-musl": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.3.0.tgz", + "integrity": "sha512-+kiRE1JIq8QdxzwoYY+wzBs9YbJ34guBweTK8nlzLKimn5EQ2b2FSC+tAOpq302BuIMjyuUGvBiUhEcLIGMQ5g==", + "optional": true + }, "@parcel/watcher-wasm": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@parcel/watcher-wasm/-/watcher-wasm-2.3.0.tgz", @@ -39226,6 +39322,24 @@ } } }, + "@parcel/watcher-win32-arm64": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.3.0.tgz", + "integrity": "sha512-35gXCnaz1AqIXpG42evcoP2+sNL62gZTMZne3IackM+6QlfMcJLy3DrjuL6Iks7Czpd3j4xRBzez3ADCj1l7Aw==", + "optional": true + }, + "@parcel/watcher-win32-ia32": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.3.0.tgz", + "integrity": "sha512-FJS/IBQHhRpZ6PiCjFt1UAcPr0YmCLHRbTc00IBTrelEjlmmgIVLeOx4MSXzx2HFEy5Jo5YdhGpxCuqCyDJ5ow==", + "optional": true + }, + "@parcel/watcher-win32-x64": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.3.0.tgz", + "integrity": "sha512-dLx+0XRdMnVI62kU3wbXvbIRhLck4aE28bIGKbRGS7BJNt54IIj9+c/Dkqb+7DJEbHUZAX1bwaoM8PqVlHJmCA==", + "optional": true + }, "@pkgr/utils": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", @@ -40947,9 +41061,9 @@ "dev": true }, "@types/lossless-json": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/lossless-json/-/lossless-json-1.0.1.tgz", - "integrity": "sha512-zPE8kmpeL5/6L5gtTQHSOkAW/OSYYNTDRt6/2oEgLO1Zd3Rj5WVDoMloTtLJxQJhZGLGbL4pktKSh3NbzdaWdw==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@types/lossless-json/-/lossless-json-1.0.2.tgz", + "integrity": "sha512-RdV8M8qlWUpmk7gnY3fBB4TNn3Ab8hMMqhJC/sG77t8Zk+hjVwvZGTFv+upEBUkxXbq0+UxGAPhOml83w1IkIQ==" }, "@types/minimist": { "version": "1.2.2", @@ -41086,9 +41200,9 @@ }, "dependencies": { "@types/node": { - "version": "18.17.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.12.tgz", - "integrity": "sha512-d6xjC9fJ/nSnfDeU0AMDsaJyb1iHsqCSOdi84w4u+SlN/UgQdY5tRhpMzaFYsI4mnpvgTivEaQd0yOUhAtOnEQ==" + "version": "18.17.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.14.tgz", + "integrity": "sha512-ZE/5aB73CyGqgQULkLG87N9GnyGe5TcQjv34pwS8tfBs1IkCh0ASM69mydb2znqd6v0eX+9Ytvk6oQRqu8T1Vw==" } } }, @@ -41291,30 +41405,30 @@ } }, "@waveshq/standard-defichain-jellyfishsdk": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@waveshq/standard-defichain-jellyfishsdk/-/standard-defichain-jellyfishsdk-2.2.0.tgz", - "integrity": "sha512-Wx/kVFDMzI04HQpjylQgFrXOlFncIxD6Me0/AFR+CA6555Bi1nMP8fDoKQgcvgZ7VqMt5UikP3WF3g5sibCqaA==", - "requires": { - "@defichain/jellyfish-address": "4.0.0-beta.10", - "@defichain/jellyfish-api-core": "4.0.0-beta.10", - "@defichain/jellyfish-network": "4.0.0-beta.10", - "@defichain/jellyfish-testing": "4.0.0-beta.10", - "@defichain/jellyfish-transaction": "4.0.0-beta.10", - "@defichain/jellyfish-transaction-builder": "4.0.0-beta.10", - "@defichain/jellyfish-wallet": "4.0.0-beta.10", - "@defichain/jellyfish-wallet-encrypted": "4.0.0-beta.10", - "@defichain/jellyfish-wallet-mnemonic": "4.0.0-beta.10", - "@defichain/playground-api-client": "4.0.0-beta.10", - "@defichain/testcontainers": "4.0.0-beta.10", - "@defichain/whale-api-client": "4.0.0-beta.10", - "@defichain/whale-api-wallet": "4.0.0-beta.10", - "defichain": "4.0.0-beta.10" + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@waveshq/standard-defichain-jellyfishsdk/-/standard-defichain-jellyfishsdk-2.4.1.tgz", + "integrity": "sha512-jkxH0VElx9e0ECt48My/p5dMNwbfW2kdyoYs6M480mRoeBVH9g+6eaWJA5PBPjhm6Eg6fUesAJxZ0HIVlY0o3A==", + "requires": { + "@defichain/jellyfish-address": "4.0.0-beta.11", + "@defichain/jellyfish-api-core": "4.0.0-beta.11", + "@defichain/jellyfish-network": "4.0.0-beta.11", + "@defichain/jellyfish-testing": "4.0.0-beta.11", + "@defichain/jellyfish-transaction": "4.0.0-beta.11", + "@defichain/jellyfish-transaction-builder": "4.0.0-beta.11", + "@defichain/jellyfish-wallet": "4.0.0-beta.11", + "@defichain/jellyfish-wallet-encrypted": "4.0.0-beta.11", + "@defichain/jellyfish-wallet-mnemonic": "4.0.0-beta.11", + "@defichain/playground-api-client": "4.0.0-beta.11", + "@defichain/testcontainers": "4.0.0-beta.11", + "@defichain/whale-api-client": "4.0.0-beta.11", + "@defichain/whale-api-wallet": "4.0.0-beta.11", + "defichain": "4.0.0-beta.11" } }, "@waveshq/standard-web": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@waveshq/standard-web/-/standard-web-2.2.0.tgz", - "integrity": "sha512-NGdLji/7kDIj4fy9Gr8YViJTyzri2qxl6WCHCufRF5oRkArmvAYQU4nYh13ocbptFgmVdwk69inZzO98gBCnfQ==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@waveshq/standard-web/-/standard-web-2.4.1.tgz", + "integrity": "sha512-lxI78iJR6MauEVMii3S7nXquTj9VfRu8E3iiZ4RZQ6CIysKx4RgrNSt2T8mntnOcPPeSCEEyE2l5THDR76oIXg==", "requires": { "@netlify/ipx": "^1.4.4", "@reduxjs/toolkit": "^1.9.5", @@ -41341,9 +41455,9 @@ } }, "@waveshq/standard-web-linter": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@waveshq/standard-web-linter/-/standard-web-linter-2.2.0.tgz", - "integrity": "sha512-GkNAinp4p4+45hCbozCPN33AeouZRB8PzIRn8Cbqw3ghKKnCOLiTM0oif2A923EK+q7E8JHBt13XjXuGtygHzg==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@waveshq/standard-web-linter/-/standard-web-linter-2.4.1.tgz", + "integrity": "sha512-zek+E/euKEJK/+tavPdASaiFMx/5xi/ak7ygMnXrGexRTH3vCB/TmDtvrGiChazvW70+TpNQjRKT/XBJM/2tGQ==", "requires": { "eslint": "^8.48.0", "eslint-config-airbnb": "^19.0.4", @@ -41361,7 +41475,7 @@ "husky": "^8.0.3", "lint-staged": "^14.0.1", "next": "13.4.19", - "prettier": "^3.0.2", + "prettier": "^3.0.3", "typescript": "4.9.5" }, "dependencies": { @@ -41373,24 +41487,24 @@ } }, "@waveshq/walletkit-core": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@waveshq/walletkit-core/-/walletkit-core-1.3.2.tgz", - "integrity": "sha512-h0COj+RxfhXKmYyvo3MKdx94fJax5k/+kqs/zJ9LZhrcw7HhORmVVrfMXomPS7kdH3+gs+g6xVIGh0AzRlNTyw==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@waveshq/walletkit-core/-/walletkit-core-1.3.4.tgz", + "integrity": "sha512-2TdVgVR7TPkqwh82dFddfoCmHTB7Bo2Xjcbri4b1VR+Q/P0+JYZgBTtEXq4kNRk8kM1axg6RfwoMigppAixvcw==", "requires": { "bignumber.js": "^9.1.1", "ethers": "^5.7.2" } }, "@waveshq/walletkit-ui": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@waveshq/walletkit-ui/-/walletkit-ui-1.3.2.tgz", - "integrity": "sha512-eqBaPOA/Ztg4jzLQALKKgeL6yp0B3SKfJnWbLuUKeOfeiCUIjO1Nooyvh44tEII+HDeLNg7M3CseZrQlPsJEdg==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@waveshq/walletkit-ui/-/walletkit-ui-1.3.4.tgz", + "integrity": "sha512-93y0ERBlEqR+KSWXW+WanZSrUsbhF+YN/lr976MCwIE/eklBcp6rRKAfJz5tIHYtsLd0WTmJJA+393H4UjBGgw==", "requires": { "@stickyjs/jest": "^1.3.2", - "@waveshq/standard-defichain-jellyfishsdk": "^2.2.0", - "@waveshq/standard-web": "^2.2.0", - "@waveshq/standard-web-linter": "^2.2.0", - "@waveshq/walletkit-core": "1.3.2", + "@waveshq/standard-defichain-jellyfishsdk": "^2.4.1", + "@waveshq/standard-web": "^2.4.1", + "@waveshq/standard-web-linter": "^2.4.1", + "@waveshq/walletkit-core": "1.3.4", "bignumber.js": "^9.1.1", "dayjs": "^1.11.9", "immer": "^9.0.21", @@ -43536,9 +43650,9 @@ "integrity": "sha512-Kgy+2+Uwr75vAi6ChWXgHuLvd+QLD7ssgpaRq2zCvt80ptvAfMc/hijcJxXkBa2wMlEZcJvC2H8Ubo+A9ATHIg==" }, "compress-commons": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-4.1.1.tgz", - "integrity": "sha512-QLdDLCKNV2dtoTorqgxngQCMA+gWXkM/Nwu7FpeBhk/RdkzimqC3jueb/FDmaZeXh+uby1jkBqE3xArsLBE5wQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-4.1.2.tgz", + "integrity": "sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg==", "requires": { "buffer-crc32": "^0.2.13", "crc32-stream": "^4.0.2", @@ -43999,9 +44113,9 @@ "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==" }, "crc32-stream": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.2.tgz", - "integrity": "sha512-DxFZ/Hk473b/muq1VJ///PMNLj0ZMnzye9thBpmjpJKCc5eMgB95aK8zCGrGfQ90cWo561Te6HK9D+j4KPdM6w==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.3.tgz", + "integrity": "sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw==", "requires": { "crc-32": "^1.2.0", "readable-stream": "^3.4.0" @@ -44733,9 +44847,9 @@ "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==" }, "defichain": { - "version": "4.0.0-beta.10", - "resolved": "https://registry.npmjs.org/defichain/-/defichain-4.0.0-beta.10.tgz", - "integrity": "sha512-6+OxGSFm1C0nDCOavmyGTFtSPWjpRt/bUk8gd2hCdfKPw2N7VAVoYdIGleYvrs00btRIdJ0XgmFnaq8v12NjlA==" + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/defichain/-/defichain-4.0.0-beta.11.tgz", + "integrity": "sha512-3IUwzuOoPaptOiUQqzeaBNZtKRpVvBAqhljwHpNwK1Ple52p+qTauk6Wb+QjPMv/0BT/EjzWQ/NxWIEyEWU0Yg==" }, "define-lazy-prop": { "version": "2.0.0", @@ -44822,9 +44936,9 @@ "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==" }, "destr": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/destr/-/destr-1.2.2.tgz", - "integrity": "sha512-lrbCJwD9saUQrqUfXvl6qoM+QN3W7tLV5pAOs+OqOmopCCz/JkE05MHedJR1xfk4IAnZuJXPVuN5+7jNA2ZCiA==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.1.tgz", + "integrity": "sha512-M1Ob1zPSIvlARiJUkKqvAZ3VAqQY6Jcuth/pBKQ2b1dX/Qx0OnJ8Vux6J2H5PTMQeRzWrrbTu70VxBfv/OPDJA==" }, "destroy": { "version": "1.2.0", @@ -48292,13 +48406,6 @@ "ufo": "^1.3.0", "uncrypto": "^0.1.3", "unenv": "^1.7.4" - }, - "dependencies": { - "destr": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.1.tgz", - "integrity": "sha512-M1Ob1zPSIvlARiJUkKqvAZ3VAqQY6Jcuth/pBKQ2b1dX/Qx0OnJ8Vux6J2H5PTMQeRzWrrbTu70VxBfv/OPDJA==" - } } }, "handlebars": { @@ -48898,28 +49005,28 @@ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" }, "ipx": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/ipx/-/ipx-1.2.0.tgz", - "integrity": "sha512-FkEP56C08HdlqlWKm3pMhatywPtDBTlePTdzskksCR1+7xnB6fQs6pXOTXPTG5i+gGPgCOxbNMUSZEH/DQcWDA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ipx/-/ipx-1.3.0.tgz", + "integrity": "sha512-Jfu+zQ0NGZwSeZ11CGMOnqWFlIyVcT8dW48e5UxKnMjQXXDy8VLTl8FIP7vRIJ9hd3ZPaJ/RIXXLJfZmBqRXWQ==", "requires": { "@fastify/accept-negotiator": "^1.1.0", - "consola": "^3.1.0", + "consola": "^3.2.3", "defu": "^6.1.2", - "destr": "^1.2.2", + "destr": "^2.0.1", "etag": "^1.8.1", "image-meta": "^0.1.1", - "listhen": "^1.0.4", - "node-fetch-native": "^1.1.1", + "listhen": "^1.4.4", + "node-fetch-native": "^1.4.0", "pathe": "^1.1.1", - "sharp": "^0.32.1", - "ufo": "^1.1.2", + "sharp": "^0.32.5", + "ufo": "^1.3.0", "xss": "^1.0.14" } }, "iron-webcrypto": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/iron-webcrypto/-/iron-webcrypto-0.8.0.tgz", - "integrity": "sha512-gScdcWHjTGclCU15CIv2r069NoQrys1UeUFFfaO1hL++ytLHkVw7N5nXJmFf3J2LEDMz1PkrvC0m62JEeu1axQ==" + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/iron-webcrypto/-/iron-webcrypto-0.8.2.tgz", + "integrity": "sha512-jGiwmpgTuF19Vt4hn3+AzaVFGpVZt7A1ysd5ivFel2r4aNVFwqaYa6aU6qsF1PM7b+WFivZHz3nipwUOXaOnHg==" }, "is-arguments": { "version": "1.1.1", @@ -51699,9 +51806,9 @@ } }, "listhen": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/listhen/-/listhen-1.4.3.tgz", - "integrity": "sha512-qVWeM07q7q5R3jwB+Zm603khFQ3yq5OLmAwLIlE3Ftv1K9yfwx4R6/tbCkkr0/SrIyKnHK9xY1C6j03uGOSnIQ==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/listhen/-/listhen-1.4.4.tgz", + "integrity": "sha512-xoZWbfziou7xPWj9nlFXeroFTJZVIyJ6wKrLea2jxvWgMkcz/vLMoZACYHLRmcLGi5hZkcDF48tmkmv1Y6Y42Q==", "requires": { "@parcel/watcher": "^2.3.0", "@parcel/watcher-wasm": "2.3.0", @@ -53162,9 +53269,9 @@ "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" }, "mlly": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.4.1.tgz", - "integrity": "sha512-SCDs78Q2o09jiZiE2WziwVBEqXQ02XkGdUy45cbJf+BpYRIjArXRJ1Wbowxkb+NaM9DWvS3UC9GiO/6eqvQ/pg==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.4.2.tgz", + "integrity": "sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==", "requires": { "acorn": "^8.10.0", "pathe": "^1.1.1", @@ -53919,13 +54026,6 @@ "destr": "^2.0.1", "node-fetch-native": "^1.4.0", "ufo": "^1.3.0" - }, - "dependencies": { - "destr": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.1.tgz", - "integrity": "sha512-M1Ob1zPSIvlARiJUkKqvAZ3VAqQY6Jcuth/pBKQ2b1dX/Qx0OnJ8Vux6J2H5PTMQeRzWrrbTu70VxBfv/OPDJA==" - } } }, "omggif": { @@ -54632,9 +54732,9 @@ "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==" }, "prettier": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.2.tgz", - "integrity": "sha512-o2YR9qtniXvwEZlOKbveKfDQVyqxbEIWn48Z8m3ZJjBjcCmUy3xZGIv+7AkaeuaTr6yPXJjwv07ZWlsWbEy1rQ==" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", + "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==" }, "prettier-linter-helpers": { "version": "1.0.0", @@ -58877,11 +58977,6 @@ "ufo": "^1.2.0" }, "dependencies": { - "destr": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.1.tgz", - "integrity": "sha512-M1Ob1zPSIvlARiJUkKqvAZ3VAqQY6Jcuth/pBKQ2b1dX/Qx0OnJ8Vux6J2H5PTMQeRzWrrbTu70VxBfv/OPDJA==" - }, "lru-cache": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", @@ -59736,13 +59831,45 @@ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" }, "zip-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.0.tgz", - "integrity": "sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.1.tgz", + "integrity": "sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ==", "requires": { - "archiver-utils": "^2.1.0", - "compress-commons": "^4.1.0", + "archiver-utils": "^3.0.4", + "compress-commons": "^4.1.2", "readable-stream": "^3.6.0" + }, + "dependencies": { + "archiver-utils": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-3.0.4.tgz", + "integrity": "sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw==", + "requires": { + "glob": "^7.2.3", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } } }, "zod": { diff --git a/package.json b/package.json index 1b100fe310..ba68c47e5e 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@react-navigation/stack": "^6.3.17", "@reduxjs/toolkit": "^1.9.5", "@shopify/flash-list": "1.4.3", - "@waveshq/standard-defichain-jellyfishsdk": "^2.2.0", + "@waveshq/standard-defichain-jellyfishsdk": "^2.4.1", "@waveshq/walletkit-core": "^1.3.5", "@waveshq/walletkit-ui": "^1.3.5", "bignumber.js": "^9.1.1",