diff --git a/app/api/wallet/index.test.ts b/app/api/wallet/index.test.ts index 74bc936770..780f9966da 100644 --- a/app/api/wallet/index.test.ts +++ b/app/api/wallet/index.test.ts @@ -18,10 +18,13 @@ it('should createWallet', async () => { const data: WalletData = { version: "v1", type: WalletType.MNEMONIC_UNPROTECTED, - raw: "408b285c123836004f4b8842c89324c1f01382450c0d439af345ba7fc49acf705489c6fc77dbd4e3dc1dd8cc6bc9f043db8ada1e243c4a0eafb290d399480840" + raw: JSON.stringify([ + '235b34cd7c9f6d7e4595ffe9ae4b1cb5606df8aca2b527d20a07c8f56b2342f4', // root priv key + 'f40eaad21641ca7cb5ac00f9ce21cac9ba070bb673a237f7bce57acda54386a4' // chain code + ]) } - const wallet = createWallet(data, options, provider) + const wallet = createWallet(data, network, provider) expect(wallet.get(0).withTransactionBuilder().utxo).toBeDefined() expect(wallet.get(0).withTransactionBuilder().dex).toBeDefined() @@ -38,6 +41,6 @@ it('should fail as wallet type not available', async () => { } expect(() => { - createWallet(data, options, provider) + createWallet(data, network, provider) }).toThrow('wallet undefined not available') }) diff --git a/app/api/wallet/index.ts b/app/api/wallet/index.ts index 70ef2cdb17..70c83db16c 100644 --- a/app/api/wallet/index.ts +++ b/app/api/wallet/index.ts @@ -1,12 +1,12 @@ -import { Network } from '@defichain/jellyfish-network' import { JellyfishWallet, WalletHdNode } from '@defichain/jellyfish-wallet' import { WhaleWalletAccount, WhaleWalletAccountProvider } from '@defichain/whale-api-wallet' +import { EnvironmentNetwork } from '../../environment' import { Mnemonic } from './mnemonic' import { WalletData, WalletType } from './persistence' export type Wallet = JellyfishWallet -export function createWallet (data: WalletData, options: Network, accountProvider: WhaleWalletAccountProvider): Wallet { +export function createWallet (data: WalletData, options: EnvironmentNetwork, accountProvider: WhaleWalletAccountProvider): Wallet { switch (data.type) { case WalletType.MNEMONIC_UNPROTECTED: return new JellyfishWallet(Mnemonic.createProvider(data, options), accountProvider) diff --git a/app/api/wallet/mnemonic.test.ts b/app/api/wallet/mnemonic.test.ts index 07b34f967a..b44bab9e6a 100644 --- a/app/api/wallet/mnemonic.test.ts +++ b/app/api/wallet/mnemonic.test.ts @@ -1,6 +1,5 @@ import { EnvironmentNetwork } from "../../environment"; import { Mnemonic } from "./mnemonic"; -import { getJellyfishNetwork } from "./network"; import { WalletData, WalletType } from "./persistence"; beforeEach(() => { @@ -12,9 +11,12 @@ describe('getMnemonicHdNodeProvider', () => { const data: WalletData = { version: "v1", type: WalletType.MNEMONIC_UNPROTECTED, - raw: "408b285c123836004f4b8842c89324c1f01382450c0d439af345ba7fc49acf705489c6fc77dbd4e3dc1dd8cc6bc9f043db8ada1e243c4a0eafb290d399480840" + raw: JSON.stringify([ + '235b34cd7c9f6d7e4595ffe9ae4b1cb5606df8aca2b527d20a07c8f56b2342f4', // root priv key + 'f40eaad21641ca7cb5ac00f9ce21cac9ba070bb673a237f7bce57acda54386a4' // chain code + ]) } - const options = getJellyfishNetwork(EnvironmentNetwork.LocalPlayground) + const options = EnvironmentNetwork.LocalPlayground const provider = Mnemonic.createProvider(data, options) expect(provider).toBeTruthy() @@ -30,20 +32,26 @@ describe('getMnemonicHdNodeProvider', () => { describe('addMnemonicHdNodeProvider', () => { it('should set mnemonic (abandon x23)', async () => { - expect(Mnemonic.createWalletDataAbandon23()).toStrictEqual({ + expect(Mnemonic.createWalletDataAbandon23(EnvironmentNetwork.LocalPlayground)).toStrictEqual({ version: "v1", type: WalletType.MNEMONIC_UNPROTECTED, - raw: "408b285c123836004f4b8842c89324c1f01382450c0d439af345ba7fc49acf705489c6fc77dbd4e3dc1dd8cc6bc9f043db8ada1e243c4a0eafb290d399480840" + raw: JSON.stringify([ + '235b34cd7c9f6d7e4595ffe9ae4b1cb5606df8aca2b527d20a07c8f56b2342f4', + 'f40eaad21641ca7cb5ac00f9ce21cac9ba070bb673a237f7bce57acda54386a4' + ]) }) }) it('should set mnemonic (void come effort ...)', async () => { const mnemonic = 'void come effort suffer camp survey warrior heavy shoot primary clutch crush open amazing screen patrol group space point ten exist slush involve unfold'.split(' ') - expect(Mnemonic.createWalletData(mnemonic)).toStrictEqual({ + expect(Mnemonic.createWalletData(mnemonic, EnvironmentNetwork.LocalPlayground)).toStrictEqual({ version: "v1", type: WalletType.MNEMONIC_UNPROTECTED, - raw: 'b873212f885ccffbf4692afcb84bc2e55886de2dfa07d90f5c3c239abc31c0a6ce047e30fd8bf6a281e71389aa82d73df74c7bbfb3b06b4639a5cee775cccd3c' + raw: JSON.stringify([ + 'b21fcb414b4414e9bcf7ae647a79a4d29280f6b71cba204cb4dd3d6c6568d0fc', + 'bbb5f26acee2e3713d43cf4e702f2b1ff8672afa9e0d5ac846196689e1d893d2' + ]) }) }) }) diff --git a/app/api/wallet/mnemonic.ts b/app/api/wallet/mnemonic.ts index b128df834f..e522795048 100644 --- a/app/api/wallet/mnemonic.ts +++ b/app/api/wallet/mnemonic.ts @@ -1,33 +1,44 @@ -import { Network } from '@defichain/jellyfish-network' -import { MnemonicHdNodeProvider, mnemonicToSeed } from '@defichain/jellyfish-wallet-mnemonic' +import { Bip32Options, MnemonicHdNodeProvider } from '@defichain/jellyfish-wallet-mnemonic' +import { EnvironmentNetwork } from '../../environment' +import { getJellyfishNetwork } from './network' import { WalletData, WalletType } from './persistence' -function createProvider (data: WalletData, options: Network): MnemonicHdNodeProvider { - const seed = Buffer.from(data.raw, 'hex') - - return MnemonicHdNodeProvider.fromSeed(seed, { +function getBip32Option (envNetwork: EnvironmentNetwork): Bip32Options { + const network = getJellyfishNetwork(envNetwork) + return { bip32: { - public: options.bip32.publicPrefix, - private: options.bip32.privatePrefix + public: network.bip32.publicPrefix, + private: network.bip32.privatePrefix }, - wif: options.wifPrefix - }) + wif: network.wifPrefix + } +} + +function createProvider (data: WalletData, network: EnvironmentNetwork): MnemonicHdNodeProvider { + if (data.type !== WalletType.MNEMONIC_UNPROTECTED || data.version !== 'v1') { + throw new Error('Unexpected WalletData') + } + const [privKey, chainCode] = JSON.parse(data.raw) + return MnemonicHdNodeProvider.fromData({ + words: [], + privKey, + chainCode + }, getBip32Option(network)) } -export function createWalletData (mnemonic: string[]): WalletData { - const seed = mnemonicToSeed(mnemonic) - const hex = seed.toString('hex') +export function createWalletData (mnemonic: string[], network: EnvironmentNetwork): WalletData { + const mnemonicData = MnemonicHdNodeProvider.wordsToData(mnemonic, getBip32Option(network)) return { version: 'v1', type: WalletType.MNEMONIC_UNPROTECTED, - raw: hex + raw: JSON.stringify([mnemonicData.privKey, mnemonicData.chainCode]) } } -export function createWalletDataAbandon23 (): WalletData { +export function createWalletDataAbandon23 (network: EnvironmentNetwork): WalletData { return createWalletData([ 'abandon', 'abandon', 'abandon', 'abandon', 'abandon', 'abandon', 'abandon', 'abandon', 'abandon', 'abandon', 'abandon', 'abandon', 'abandon', 'abandon', 'abandon', 'abandon', 'abandon', 'abandon', 'abandon', 'abandon', 'abandon', 'abandon', 'abandon', 'art' - ]) + ], network) } export const Mnemonic = { diff --git a/app/contexts/WalletManagementContext.tsx b/app/contexts/WalletManagementContext.tsx index c13404cbdc..9a85506da8 100644 --- a/app/contexts/WalletManagementContext.tsx +++ b/app/contexts/WalletManagementContext.tsx @@ -33,7 +33,7 @@ export function WalletManagementProvider (props: React.PropsWithChildren): const wallets = useMemo(() => { const options = getJellyfishNetwork(network) const provider = new WhaleWalletAccountProvider(client, options) - return dataList.map(data => createWallet(data, options, provider)) + return dataList.map(data => createWallet(data, network, provider)) }, [dataList]) const management: WalletManagement = { diff --git a/app/screens/PlaygroundNavigator/sections/PlaygroundToken.tsx b/app/screens/PlaygroundNavigator/sections/PlaygroundToken.tsx index fa69bf82f1..f5c787a4dd 100644 --- a/app/screens/PlaygroundNavigator/sections/PlaygroundToken.tsx +++ b/app/screens/PlaygroundNavigator/sections/PlaygroundToken.tsx @@ -1,21 +1,6 @@ import { TokenInfo } from '@defichain/jellyfish-api-core/dist/category/token' -import { UTXO } from '@defichain/jellyfish-api-core/dist/category/wallet' -import { Bech32, Bs58, WIF } from '@defichain/jellyfish-crypto' -import { RegTest } from '@defichain/jellyfish-network' -import { - CTransactionSegWit, - DeFiTransactionConstants, - OP_CODES, - Script, - Transaction, - Vout -} from '@defichain/jellyfish-transaction' -import { TransactionSigner } from '@defichain/jellyfish-transaction-signature' -import { toOPCodes } from '@defichain/jellyfish-transaction/dist/script/_buffer' import { PlaygroundRpcClient } from '@defichain/playground-api-client' -import { BigNumber } from 'bignumber.js' import React, { useEffect, useState } from 'react' -import { SmartBuffer } from 'smart-buffer' import { Text, View } from '../../../components' import { usePlaygroundContext } from '../../../contexts/PlaygroundContext' import { useWalletManagementContext } from '../../../contexts/WalletManagementContext' @@ -23,19 +8,9 @@ import { tailwind } from '../../../tailwind' import { PlaygroundAction } from '../components/PlaygroundAction' import { PlaygroundStatus } from '../components/PlaygroundStatus' -/** - * Depend on defid setup in playground - * @see https://github.com/DeFiCh/playground/blob/main/src/module.playground/setup/setup.ts#L8-L9 - */ -const PLAYGROUND_MN = { - address: 'mwsZw8nF7pKxWH8eoKL9tPxTpaFkz7QeLU', - privKey: 'cRiRQ9cHmy5evDqNDdEV8f6zfbK6epi9Fpz4CRZsmLEmkwy54dWz', - pubKeyHash: Bs58.toHash160('mwsZw8nF7pKxWH8eoKL9tPxTpaFkz7QeLU').buffer -} - export function PlaygroundToken (): JSX.Element | null { const { wallets } = useWalletManagementContext() - const { rpc } = usePlaygroundContext() + const { rpc, api } = usePlaygroundContext() const [status, setStatus] = useState('loading') const [tokens, setTokens] = useState([]) @@ -85,8 +60,10 @@ export function PlaygroundToken (): JSX.Element | null { testID='playground_token_DFI' title='Top up 10.0 DFI to Wallet' onPress={async () => { - const script = await wallets[0].get(0).getScript() - await playgroundUtxoToUserAccount(rpc, script) + await api.wallet.sendTokenDfiToAddress({ + amount: '10', + address: await wallets[0].get(0).getAddress() + }) }} /> {actions} @@ -103,66 +80,3 @@ async function getTokens (rpcClient: PlaygroundRpcClient): Promise Number.parseInt(a.id)) } - -/** - * this action requires 2 steps, convert utxos into token - * main user token balance require at least 6-8 seconds to be reflected - */ -async function playgroundUtxoToUserAccount (rpcClient: PlaygroundRpcClient, recipientLockScript: Script, amount: BigNumber = new BigNumber(10)): Promise { - const pair = WIF.asEllipticPair(PLAYGROUND_MN.privKey) - - // create a P2WPKH address to hold utxo - const tempMNAddress = Bech32.fromHash160(PLAYGROUND_MN.pubKeyHash, RegTest.bech32.hrp) - - // fund utxo to playground new address - const txid = await rpcClient.call('sendtoaddress', [tempMNAddress, amount.plus(0.001).toNumber()], 'bignumber') - await (new Promise(resolve => { setTimeout(resolve, 3100) })) // wait for a block - const utxos = await rpcClient.call('listunspent', [1, 9999999, [tempMNAddress], false], 'bignumber') - const utxo: UTXO = (utxos as UTXO[]).find(utxo => utxo.txid === txid) as UTXO - const utxoLockScript = { stack: toOPCodes(SmartBuffer.fromBuffer(Buffer.from(utxo.scriptPubKey, 'hex'))) } - - // send token to user (wallet account) - const a2a: Vout = { - value: amount, - script: { - stack: [OP_CODES.OP_RETURN, OP_CODES.OP_DEFI_TX_UTXOS_TO_ACCOUNT({ - to: [{ - script: recipientLockScript, - balances: [{ - token: 0, - amount - }] - }] - })] - }, - tokenId: 0x00 - } - - const transaction: Transaction = { - version: DeFiTransactionConstants.Version, - vin: [ - { - index: utxo.vout, - script: { stack: [] }, - sequence: 0xffffffff, - txid: utxo.txid - } - ], - vout: [ - a2a - // assume no change, 0.001 spared for fee - ], - lockTime: 0x00000000 - } - - const signed = await TransactionSigner.sign(transaction, [{ - prevout: { - value: new BigNumber(10.001), - script: utxoLockScript, - tokenId: 0x00 - }, - ellipticPair: pair - }]) - - return await rpcClient.rawtx.sendRawTransaction(new CTransactionSegWit(signed).toHex()) -} diff --git a/app/screens/PlaygroundNavigator/sections/PlaygroundUTXO.tsx b/app/screens/PlaygroundNavigator/sections/PlaygroundUTXO.tsx index 39b9777636..7b58ae4923 100644 --- a/app/screens/PlaygroundNavigator/sections/PlaygroundUTXO.tsx +++ b/app/screens/PlaygroundNavigator/sections/PlaygroundUTXO.tsx @@ -12,7 +12,7 @@ export function PlaygroundUTXO (): JSX.Element | null { const [status, setStatus] = useState('loading') useEffect(() => { - api.playground.wallet().then(() => { + api.wallet.balances().then(() => { setStatus('online') }).catch(() => { setStatus('error') diff --git a/app/screens/PlaygroundNavigator/sections/PlaygroundWallet.tsx b/app/screens/PlaygroundNavigator/sections/PlaygroundWallet.tsx index e406a0563f..f7f4087566 100644 --- a/app/screens/PlaygroundNavigator/sections/PlaygroundWallet.tsx +++ b/app/screens/PlaygroundNavigator/sections/PlaygroundWallet.tsx @@ -1,9 +1,10 @@ -import { generateMnemonic } from '@defichain/jellyfish-wallet-mnemonic' +import { generateMnemonicWords } from '@defichain/jellyfish-wallet-mnemonic' import * as Random from 'expo-random' import React from 'react' import { useDispatch, useSelector } from 'react-redux' import { Mnemonic } from '../../../api/wallet/mnemonic' import { Text, View } from '../../../components' +import { useNetworkContext } from '../../../contexts/NetworkContext' import { useWalletManagementContext } from '../../../contexts/WalletManagementContext' import { useWhaleApiClient } from '../../../contexts/WhaleContext' import { fetchTokens } from '../../../hooks/wallet/TokensAPI' @@ -14,6 +15,7 @@ import { PlaygroundStatus } from '../components/PlaygroundStatus' export function PlaygroundWallet (): JSX.Element | null { const { wallets, clearWallets, setWallet } = useWalletManagementContext() + const network = useNetworkContext() const whaleApiClient = useWhaleApiClient() const dispatch = useDispatch() const address = useSelector((state: RootState) => state.wallet.address) @@ -39,19 +41,19 @@ export function PlaygroundWallet (): JSX.Element | null { await setWallet(Mnemonic.createWalletDataAbandon23())} + onPress={async () => await setWallet(Mnemonic.createWalletDataAbandon23(network.network))} /> { - const words = generateMnemonic(24, numOfBytes => { + const words = generateMnemonicWords(24, (numOfBytes: number) => { const bytes = Random.getRandomBytes(numOfBytes) return Buffer.from(bytes) }) - await setWallet(Mnemonic.createWalletData(words)) + await setWallet(Mnemonic.createWalletData(words, network.network)) }} /> diff --git a/app/screens/WalletNavigator/screens/WalletMnemonicCreateVerify.tsx b/app/screens/WalletNavigator/screens/WalletMnemonicCreateVerify.tsx index 87419ee0b4..687ecd4002 100644 --- a/app/screens/WalletNavigator/screens/WalletMnemonicCreateVerify.tsx +++ b/app/screens/WalletNavigator/screens/WalletMnemonicCreateVerify.tsx @@ -4,6 +4,7 @@ import { useState } from 'react' import { KeyboardAvoidingView, ScrollView, TouchableOpacity } from 'react-native' import { Mnemonic } from '../../../api/wallet/mnemonic' import { Text, TextInput, View } from '../../../components' +import { useNetworkContext } from '../../../contexts/NetworkContext' import { useWalletManagementContext } from '../../../contexts/WalletManagementContext' import { tailwind } from '../../../tailwind' import { WalletParamList } from '../WalletNavigator' @@ -15,11 +16,12 @@ export function WalletMnemonicCreateVerify ({ route }: Props): JSX.Element { const enteredWords: string[] = [] const [valid, setValid] = useState(true) + const { network } = useNetworkContext() const { setWallet } = useWalletManagementContext() async function onVerify (): Promise { if (actualWords.join(' ') === enteredWords.join(' ')) { - await setWallet(Mnemonic.createWalletData(enteredWords)) + await setWallet(Mnemonic.createWalletData(enteredWords, network)) } else { setValid(false) } diff --git a/app/screens/WalletNavigator/screens/WalletMnemonicRestore.tsx b/app/screens/WalletNavigator/screens/WalletMnemonicRestore.tsx index e467d7e1af..c213ff99b8 100644 --- a/app/screens/WalletNavigator/screens/WalletMnemonicRestore.tsx +++ b/app/screens/WalletNavigator/screens/WalletMnemonicRestore.tsx @@ -4,10 +4,12 @@ import { useState } from 'react' import { KeyboardAvoidingView, ScrollView, TouchableOpacity } from 'react-native' import { Mnemonic } from '../../../api/wallet/mnemonic' import { Text, TextInput, View } from '../../../components' +import { useNetworkContext } from '../../../contexts/NetworkContext' import { useWalletManagementContext } from '../../../contexts/WalletManagementContext' import { tailwind } from '../../../tailwind' export function WalletMnemonicRestore (): JSX.Element { + const { network } = useNetworkContext() const { setWallet } = useWalletManagementContext() const [phrase, setPhrase] = useState('') const [valid, setValid] = useState(true) @@ -15,7 +17,7 @@ export function WalletMnemonicRestore (): JSX.Element { async function onRestore (): Promise { const words = phrase.split(' ') if (validateMnemonicSentence(words)) { - await setWallet(Mnemonic.createWalletData(words)) + await setWallet(Mnemonic.createWalletData(words, network)) } else { setValid(false) } diff --git a/app/screens/WalletNavigator/screens/WalletOnboarding.tsx b/app/screens/WalletNavigator/screens/WalletOnboarding.tsx index 86f0b60016..3b9c24ada7 100644 --- a/app/screens/WalletNavigator/screens/WalletOnboarding.tsx +++ b/app/screens/WalletNavigator/screens/WalletOnboarding.tsx @@ -4,17 +4,19 @@ import { ScrollView, TouchableOpacity } from 'react-native' import { Mnemonic } from '../../../api/wallet/mnemonic' import { Text, View } from '../../../components' import { VectorIcon, VectorIconName } from '../../../constants/Theme' +import { useNetworkContext } from '../../../contexts/NetworkContext' import { useWalletManagementContext } from '../../../contexts/WalletManagementContext' import { getEnvironment } from '../../../environment' import { tailwind } from '../../../tailwind' import { translate } from '../../../translations' export function WalletOnboarding (): JSX.Element { + const { network } = useNetworkContext() const { setWallet } = useWalletManagementContext() const navigator = useNavigation() const onDebugPress = getEnvironment().debug ? async () => { - await setWallet(Mnemonic.createWalletDataAbandon23()) + await setWallet(Mnemonic.createWalletDataAbandon23(network)) } : undefined return ( diff --git a/cypress/integration/functional/balances/balances.spec.ts b/cypress/integration/functional/balances/balances.spec.ts index 52a3953810..cc27f76688 100644 --- a/cypress/integration/functional/balances/balances.spec.ts +++ b/cypress/integration/functional/balances/balances.spec.ts @@ -2,7 +2,9 @@ context('wallet/balances', () => { beforeEach(function () { cy.createEmptyWallet(true) cy.getByTestID('bottom_tab_settings').click() - cy.sendDFItoWallet().sendTokenToWallet(['DFI', 'BTC', 'ETH']).wait(10000) + cy.sendDFItoWallet() + .sendDFITokentoWallet() + .sendTokenToWallet(['BTC', 'ETH']).wait(10000) cy.getByTestID('playground_wallet_fetch_balances').click() cy.getByTestID('bottom_tab_balances').click() }) diff --git a/cypress/integration/functional/balances/convert/convert_account_to_utxos.spec.ts b/cypress/integration/functional/balances/convert/convert_account_to_utxos.spec.ts index f765bde715..f5600ee2bb 100644 --- a/cypress/integration/functional/balances/convert/convert_account_to_utxos.spec.ts +++ b/cypress/integration/functional/balances/convert/convert_account_to_utxos.spec.ts @@ -3,7 +3,7 @@ context('wallet/balances/convert - accountToUtxos', () => { cy.createEmptyWallet(true) cy.getByTestID('bottom_tab_settings').click() - cy.sendDFItoWallet().sendTokenToWallet(['DFI']).wait(10000) + cy.sendDFItoWallet().sendDFITokentoWallet().wait(10000) cy.getByTestID('playground_wallet_fetch_balances').click() cy.getByTestID('bottom_tab_balances').click() diff --git a/cypress/integration/functional/dex/confirm_add_liq.spec.ts b/cypress/integration/functional/dex/confirm_add_liq.spec.ts index e02859cf0d..4fbdf0bd1a 100644 --- a/cypress/integration/functional/dex/confirm_add_liq.spec.ts +++ b/cypress/integration/functional/dex/confirm_add_liq.spec.ts @@ -4,7 +4,9 @@ context('app/dex/addLiquidity', () => { cy.getByTestID('bottom_tab_settings').click() // fund DFI token involve multiple actions, ready in 2 blocks - cy.sendDFItoWallet().sendTokenToWallet(['DFI', 'BTC']).wait(10000) + cy.sendDFItoWallet() + .sendDFITokentoWallet() + .sendTokenToWallet(['BTC']).wait(10000) cy.getByTestID('playground_wallet_fetch_balances').click() cy.getByTestID('bottom_tab_liquidity').click() diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index 9f61e30313..5f8bb45130 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -45,6 +45,12 @@ declare namespace Cypress { */ sendDFItoWallet (): Chainable + /** + * @description Sends DFI Token to wallet. + * @example cy.sendDFITokentoWallet().wait(4000) + */ + sendDFITokentoWallet (): Chainable + /** * @description Sends token to wallet. Accepts a list of token symbols to be sent. * @param {string[]} tokens to be sent @@ -69,28 +75,16 @@ Cypress.Commands.add('sendDFItoWallet', () => { cy.wait(['@sendToAddress']) }) -Cypress.Commands.add('sendTokenToWallet', (tokens: string[]) => { - const sendingNonDFI = tokens.find(token => token !== 'DFI') !== undefined - const sendingDFI = tokens.includes('DFI') - - if (sendingNonDFI) { - cy.intercept('/v0/playground/rpc/sendtokenstoaddress').as('sendTokensToAddress') - } - - if (sendingDFI) { - cy.intercept('/v0/playground/rpc/sendrawtransaction').as('sendRawTransaction') - } +Cypress.Commands.add('sendDFITokentoWallet', () => { + cy.intercept('/v0/playground/wallet/tokens/dfi/sendtoaddress').as('sendToAddress') + cy.getByTestID('playground_token_DFI').click() + cy.wait(['@sendToAddress']) +}) +Cypress.Commands.add('sendTokenToWallet', (tokens: string[]) => { + cy.intercept('/v0/playground/rpc/sendtokenstoaddress').as('sendTokensToAddress') tokens.forEach((t: string) => { cy.getByTestID(`playground_token_${t}`).click() }) - - const requests = [] - if (sendingNonDFI) { - requests.push('@sendTokensToAddress') - } - if (sendingDFI) { - requests.push('@sendRawTransaction') - } - cy.wait(requests) + cy.wait(['@sendTokensToAddress']) }) diff --git a/docker-compose.yml b/docker-compose.yml index c0d1e31f2c..78239730b4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,7 +41,7 @@ services: -eunosheight=6 defi-playground: - image: ghcr.io/defich/playground:0.5.6 + image: ghcr.io/defich/playground:0.6.0 depends_on: - defi-blockchain ports: @@ -54,7 +54,7 @@ services: - "traefik.http.routers.playground.entrypoints=web" defi-whale: - image: ghcr.io/defich/whale:0.5.9 + image: ghcr.io/defich/whale:0.5.10 depends_on: - defi-blockchain ports: diff --git a/package-lock.json b/package-lock.json index fd1018c827..7b4fa3c5a2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,16 +7,16 @@ "name": "@defichain/wallet", "license": "MIT", "dependencies": { - "@defichain/jellyfish-address": ">=0.27.0", - "@defichain/jellyfish-api-core": ">=0.27.0", - "@defichain/jellyfish-network": ">=0.27.0", - "@defichain/jellyfish-transaction": ">=0.27.0", - "@defichain/jellyfish-transaction-builder": ">=0.27.0", - "@defichain/jellyfish-wallet": ">=0.27.0", - "@defichain/jellyfish-wallet-mnemonic": ">=0.27.0", - "@defichain/playground-api-client": ">=0.5.6", - "@defichain/whale-api-client": ">=0.5.9", - "@defichain/whale-api-wallet": ">=0.5.9", + "@defichain/jellyfish-address": ">=0.29.0", + "@defichain/jellyfish-api-core": ">=0.29.0", + "@defichain/jellyfish-network": ">=0.29.0", + "@defichain/jellyfish-transaction": ">=0.29.0", + "@defichain/jellyfish-transaction-builder": ">=0.29.0", + "@defichain/jellyfish-wallet": ">=0.29.0", + "@defichain/jellyfish-wallet-mnemonic": ">=0.29.0", + "@defichain/playground-api-client": ">=0.6.0", + "@defichain/whale-api-client": ">=0.5.10", + "@defichain/whale-api-wallet": ">=0.5.10", "@expo-google-fonts/ibm-plex-sans": "^0.2.0", "@expo/vector-icons": "^12.0.0", "@expo/webpack-config": "~0.12.63", @@ -2127,28 +2127,28 @@ } }, "node_modules/@defichain/jellyfish-address": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-address/-/jellyfish-address-0.27.0.tgz", - "integrity": "sha512-tcfEteNEyaXAPmqY2ConS7MQAhmxs43wtfglZj74IaZgN2Gp7zsKmZwsPgCme/AR8alAo0W0oGSZqM10PA62ww==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-address/-/jellyfish-address-0.29.0.tgz", + "integrity": "sha512-miFMJsOsDMhDc7NklE6nmFwcGmAtv1E/l5Uw3SdEv0meU5u9fv3I41yZS7wFwk/kUgDvgF3LeZNfiDVx6f2v1Q==", "dependencies": { - "@defichain/jellyfish-crypto": "^0.27.0", - "@defichain/jellyfish-network": "^0.27.0", - "@defichain/jellyfish-transaction": "^0.27.0", + "@defichain/jellyfish-crypto": "^0.29.0", + "@defichain/jellyfish-network": "^0.29.0", + "@defichain/jellyfish-transaction": "^0.29.0", "bs58": "^4.0.1" } }, "node_modules/@defichain/jellyfish-api-core": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-api-core/-/jellyfish-api-core-0.27.0.tgz", - "integrity": "sha512-opXNZLsm7p3UQAuDDE+oqHI2HcwwQfgc7/mWo9CxAnC8QmNh1MJzj1VFFlerOs02O/A9IFGdl0XkyGuNs/j57A==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-api-core/-/jellyfish-api-core-0.29.0.tgz", + "integrity": "sha512-gRmw55bQK0QwPHZ8Rfqv7GVdFJ6MOcjF/H2Xxtmqez+iFUA0EniGMHqloYvLjFABCNlhZvOJd8HU242IWStLsg==", "dependencies": { - "@defichain/jellyfish-json": "^0.27.0" + "@defichain/jellyfish-json": "^0.29.0" } }, "node_modules/@defichain/jellyfish-crypto": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-crypto/-/jellyfish-crypto-0.27.0.tgz", - "integrity": "sha512-gOiRWQCNQoRj0dTxKO0IK9eu8gquKjHWbVEzkO+Z9uKfl3AuxRjW2dIcMEgUz54Z0C1t7KjHGe3XKsLtAog95w==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-crypto/-/jellyfish-crypto-0.29.0.tgz", + "integrity": "sha512-QGIN8WGisE8uIhQD1nCSic+QCIfU/s8pGMufiDEukceThovukcT+jhWvfjmGf8qnXSViuTf8SXR+EjT+R83R7A==", "dependencies": { "bech32": "^2.0.0", "bip66": "^1.1.5", @@ -2161,9 +2161,9 @@ } }, "node_modules/@defichain/jellyfish-json": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-json/-/jellyfish-json-0.27.0.tgz", - "integrity": "sha512-AJ65qINsNVXJ+tDAYtVQMHC9NxyAWogJKiv2sQgI2rqil0Q7lhy+yJjIF3/zx2dCf2kcTG3I5yKBNpyLshQB+w==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-json/-/jellyfish-json-0.29.0.tgz", + "integrity": "sha512-g9b0y0FXVNW4c9/RH8fSozVqU5+R1XR7huJi7P/ublnNJvZmI1c76pY+QIRh7dc8HXp8560hK+ZBVvL6QImO2g==", "dependencies": { "@types/lossless-json": "^1.0.1", "lossless-json": "^1.0.4" @@ -2173,16 +2173,16 @@ } }, "node_modules/@defichain/jellyfish-network": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-network/-/jellyfish-network-0.27.0.tgz", - "integrity": "sha512-P/oi3Tgw5/SGBSkIJfrBcjfn41X2cMJ0aPr9C6wX+JR/06cdM9qIpXfWQcadYpezGuZklMnvCdENlnKxTAKKXw==" + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-network/-/jellyfish-network-0.29.0.tgz", + "integrity": "sha512-Ck189MzMPYrospxqOgWPGTvSdHeEuN7g0PE+Tk87aDPKethLWAcVyY9SNUXepHoGS5N48UDPaxvywoLlW+hQwA==" }, "node_modules/@defichain/jellyfish-transaction": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction/-/jellyfish-transaction-0.27.0.tgz", - "integrity": "sha512-nkn9wPgFG/wHKpJWBnT67Jo58oYIBYKUYSQG0jz91dTDPyJnnejR7dgxfKjZPXxRLA9CZaqIu3m1czruhq//tQ==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction/-/jellyfish-transaction-0.29.0.tgz", + "integrity": "sha512-d2cTzZparx9DUM6vtCiMKT0v3+xlXN5NcwBA8xp6+DrXFlscRGVaKBgj/c4+QCE89pb9EwpfKowwQt+6LmVq5w==", "dependencies": { - "@defichain/jellyfish-crypto": "^0.27.0", + "@defichain/jellyfish-crypto": "^0.29.0", "smart-buffer": "^4.1.0" }, "peerDependencies": { @@ -2190,25 +2190,25 @@ } }, "node_modules/@defichain/jellyfish-transaction-builder": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction-builder/-/jellyfish-transaction-builder-0.27.0.tgz", - "integrity": "sha512-lwgRVhDV0yx0wX0lwwKVP0Nj0Ds7+WTuCemOzIbUuFvocct/FRelESZ+ceUL2mLy5VczDt1oOwX+hT87VYs8Ww==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction-builder/-/jellyfish-transaction-builder-0.29.0.tgz", + "integrity": "sha512-jm6I9DKBQofjmk0ASBUBnbjF1A7efHBQrB38OiNkOYTFk6PIbZHsW/8YsOg9JrtvoSYDYCKy0dys3x7g+la1mA==", "dependencies": { - "@defichain/jellyfish-crypto": "^0.27.0", - "@defichain/jellyfish-transaction": "^0.27.0", - "@defichain/jellyfish-transaction-signature": "^0.27.0" + "@defichain/jellyfish-crypto": "^0.29.0", + "@defichain/jellyfish-transaction": "^0.29.0", + "@defichain/jellyfish-transaction-signature": "^0.29.0" }, "peerDependencies": { "bignumber.js": "^9.0.1" } }, "node_modules/@defichain/jellyfish-transaction-signature": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction-signature/-/jellyfish-transaction-signature-0.27.0.tgz", - "integrity": "sha512-hUot6R9fqvut4CcCnvyt0AXJFgYONI+6ZdDFXtcJg2U+O/CFuhserxOW4525/qQVpxLFfRjt96CLHGecXlVtsg==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction-signature/-/jellyfish-transaction-signature-0.29.0.tgz", + "integrity": "sha512-YVJVJRJXBpWv8Ajsl+VOP6STW1LLbaZwudvmemYYJBxRbqJQkxGT3xykDDJT6wnXGgO0aMDcPhx/S8zOhutViA==", "dependencies": { - "@defichain/jellyfish-crypto": "^0.27.0", - "@defichain/jellyfish-transaction": "^0.27.0", + "@defichain/jellyfish-crypto": "^0.29.0", + "@defichain/jellyfish-transaction": "^0.29.0", "smart-buffer": "^4.1.0" }, "peerDependencies": { @@ -2216,59 +2216,59 @@ } }, "node_modules/@defichain/jellyfish-wallet": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-wallet/-/jellyfish-wallet-0.27.0.tgz", - "integrity": "sha512-xN9rNO2iuMVbQ4lmdQH8CqQJsQl7W0F69Xz1fd5ECtjjHG0hv2V/HWI4LZpXJO/ihaB3ZT+3GKV58B2WIurjRw==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-wallet/-/jellyfish-wallet-0.29.0.tgz", + "integrity": "sha512-CcOFaqSJVOqSXjWwD4pfPsk8pTyifV+7eKz6+UstUVtj8cp3LzhPGdvGf/7TDdEMGp+HJwJEr/hTxbN13ukrTA==", "dependencies": { - "@defichain/jellyfish-address": "^0.27.0", - "@defichain/jellyfish-crypto": "^0.27.0", - "@defichain/jellyfish-network": "^0.27.0", - "@defichain/jellyfish-transaction": "^0.27.0" + "@defichain/jellyfish-address": "^0.29.0", + "@defichain/jellyfish-crypto": "^0.29.0", + "@defichain/jellyfish-network": "^0.29.0", + "@defichain/jellyfish-transaction": "^0.29.0" }, "peerDependencies": { "bignumber.js": "^9.0.1" } }, "node_modules/@defichain/jellyfish-wallet-mnemonic": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-wallet-mnemonic/-/jellyfish-wallet-mnemonic-0.27.0.tgz", - "integrity": "sha512-2omLfGCEPwsFMbU8asbGzuDht6LBapMErsXu6twrz8z7peijoPd1dQ9AXi6TkOwTfQobUf3SrMM2I7WuXa7A6A==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-wallet-mnemonic/-/jellyfish-wallet-mnemonic-0.29.0.tgz", + "integrity": "sha512-zSbMynMCmdkKf3iwbHhpL0dSG/OG+jPfTKKAy3AIpD8bQ9Tf5x2oielYOYSGfcpXggMAgmTeFp57wt8aUVVSiQ==", "dependencies": { - "@defichain/jellyfish-transaction": "^0.27.0", - "@defichain/jellyfish-wallet": "^0.27.0", + "@defichain/jellyfish-transaction": "^0.29.0", + "@defichain/jellyfish-wallet": "^0.29.0", "bip32": "^2.0.6", "bip39": "^3.0.4" } }, "node_modules/@defichain/playground-api-client": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/@defichain/playground-api-client/-/playground-api-client-0.5.6.tgz", - "integrity": "sha512-NThDzgG5ylgBkKZKTWS1XTrHLuAvf9A5hJKDuEb+Ovcd2eZJtxw1f2D3/OAdLbr1dvTld/0QFmcG2SBZyLeoMg==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@defichain/playground-api-client/-/playground-api-client-0.6.0.tgz", + "integrity": "sha512-0Jn3EA+9vm1O0bfUVc1uLxBbCBenQLTZBCmBc3scHfZpnkY/4L2mgBmJ5Zs8OSpGJ1IovvjuDTf/Lm8whkZYjA==", "dependencies": { - "@defichain/jellyfish-api-core": ">=0.27.0", + "@defichain/jellyfish-api-core": ">=0.29.0", "abort-controller": "^3.0.0", "cross-fetch": "^3.1.2" } }, "node_modules/@defichain/whale-api-client": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/@defichain/whale-api-client/-/whale-api-client-0.5.9.tgz", - "integrity": "sha512-/YRbsnyNn4qhtQjuoL7634xOVHcSYuYJXo8yI4JqHGzPiDoPVbsI3vMvAoZpNsNpR5aChi6y7O0ANifInV7XqQ==", + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/@defichain/whale-api-client/-/whale-api-client-0.5.10.tgz", + "integrity": "sha512-vYzj9mMsUrk2378EzOaqGe77RmKv9ZD70/pYZqhoB0gNBHjMflRr/ophTvvD4KJIyqna4Li397/XC7+uHayZlg==", "dependencies": { - "@defichain/jellyfish-api-core": ">=0.27.0", + "@defichain/jellyfish-api-core": ">=0.29.0", "abort-controller": "^3.0.0", "cross-fetch": "^3.1.2", "url-search-params-polyfill": "8.1.1" } }, "node_modules/@defichain/whale-api-wallet": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/@defichain/whale-api-wallet/-/whale-api-wallet-0.5.9.tgz", - "integrity": "sha512-ZSDO1Hqm1SN1GeCcxpQktuYxCY+wyMrbF0/fsoc08NRceO8wpIC2qlbXy73i3ttCAsk1pAM8tLVc61agrWB0wQ==", + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/@defichain/whale-api-wallet/-/whale-api-wallet-0.5.10.tgz", + "integrity": "sha512-UnKzXKfSCgriweZmWJREWp5QZnynuaTkO4OeU4pundHlh2OGExutFrIRWTBXgATrHE9y8aLHBJH6rFiNxV9v6A==", "dependencies": { - "@defichain/jellyfish-transaction-builder": ">=0.27.0", - "@defichain/jellyfish-wallet": ">=0.27.0", - "@defichain/whale-api-client": "^0.5.9" + "@defichain/jellyfish-transaction-builder": ">=0.29.0", + "@defichain/jellyfish-wallet": ">=0.29.0", + "@defichain/whale-api-client": "^0.5.10" } }, "node_modules/@egjs/hammerjs": { @@ -23471,9 +23471,9 @@ } }, "node_modules/lossless-json": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lossless-json/-/lossless-json-1.0.4.tgz", - "integrity": "sha512-zEkWwELMSQQISdtOF44vk0bRJhN/PJ93qcgJLcodizQjxrJKdFrq2H1+Xv5QDe7v3dTYYbBI5hOsh4a9l0B2Ow==" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/lossless-json/-/lossless-json-1.0.5.tgz", + "integrity": "sha512-RicKUuLwZVNZ6ZdJHgIZnSeA05p8qWc5NW0uR96mpPIjN9WDLUg9+kj1esQU1GkPn9iLZVKatSQK5gyiaFHgJA==" }, "node_modules/lower-case": { "version": "2.0.2", @@ -42394,28 +42394,28 @@ } }, "@defichain/jellyfish-address": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-address/-/jellyfish-address-0.27.0.tgz", - "integrity": "sha512-tcfEteNEyaXAPmqY2ConS7MQAhmxs43wtfglZj74IaZgN2Gp7zsKmZwsPgCme/AR8alAo0W0oGSZqM10PA62ww==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-address/-/jellyfish-address-0.29.0.tgz", + "integrity": "sha512-miFMJsOsDMhDc7NklE6nmFwcGmAtv1E/l5Uw3SdEv0meU5u9fv3I41yZS7wFwk/kUgDvgF3LeZNfiDVx6f2v1Q==", "requires": { - "@defichain/jellyfish-crypto": "^0.27.0", - "@defichain/jellyfish-network": "^0.27.0", - "@defichain/jellyfish-transaction": "^0.27.0", + "@defichain/jellyfish-crypto": "^0.29.0", + "@defichain/jellyfish-network": "^0.29.0", + "@defichain/jellyfish-transaction": "^0.29.0", "bs58": "^4.0.1" } }, "@defichain/jellyfish-api-core": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-api-core/-/jellyfish-api-core-0.27.0.tgz", - "integrity": "sha512-opXNZLsm7p3UQAuDDE+oqHI2HcwwQfgc7/mWo9CxAnC8QmNh1MJzj1VFFlerOs02O/A9IFGdl0XkyGuNs/j57A==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-api-core/-/jellyfish-api-core-0.29.0.tgz", + "integrity": "sha512-gRmw55bQK0QwPHZ8Rfqv7GVdFJ6MOcjF/H2Xxtmqez+iFUA0EniGMHqloYvLjFABCNlhZvOJd8HU242IWStLsg==", "requires": { - "@defichain/jellyfish-json": "^0.27.0" + "@defichain/jellyfish-json": "^0.29.0" } }, "@defichain/jellyfish-crypto": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-crypto/-/jellyfish-crypto-0.27.0.tgz", - "integrity": "sha512-gOiRWQCNQoRj0dTxKO0IK9eu8gquKjHWbVEzkO+Z9uKfl3AuxRjW2dIcMEgUz54Z0C1t7KjHGe3XKsLtAog95w==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-crypto/-/jellyfish-crypto-0.29.0.tgz", + "integrity": "sha512-QGIN8WGisE8uIhQD1nCSic+QCIfU/s8pGMufiDEukceThovukcT+jhWvfjmGf8qnXSViuTf8SXR+EjT+R83R7A==", "requires": { "bech32": "^2.0.0", "bip66": "^1.1.5", @@ -42428,99 +42428,99 @@ } }, "@defichain/jellyfish-json": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-json/-/jellyfish-json-0.27.0.tgz", - "integrity": "sha512-AJ65qINsNVXJ+tDAYtVQMHC9NxyAWogJKiv2sQgI2rqil0Q7lhy+yJjIF3/zx2dCf2kcTG3I5yKBNpyLshQB+w==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-json/-/jellyfish-json-0.29.0.tgz", + "integrity": "sha512-g9b0y0FXVNW4c9/RH8fSozVqU5+R1XR7huJi7P/ublnNJvZmI1c76pY+QIRh7dc8HXp8560hK+ZBVvL6QImO2g==", "requires": { "@types/lossless-json": "^1.0.1", "lossless-json": "^1.0.4" } }, "@defichain/jellyfish-network": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-network/-/jellyfish-network-0.27.0.tgz", - "integrity": "sha512-P/oi3Tgw5/SGBSkIJfrBcjfn41X2cMJ0aPr9C6wX+JR/06cdM9qIpXfWQcadYpezGuZklMnvCdENlnKxTAKKXw==" + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-network/-/jellyfish-network-0.29.0.tgz", + "integrity": "sha512-Ck189MzMPYrospxqOgWPGTvSdHeEuN7g0PE+Tk87aDPKethLWAcVyY9SNUXepHoGS5N48UDPaxvywoLlW+hQwA==" }, "@defichain/jellyfish-transaction": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction/-/jellyfish-transaction-0.27.0.tgz", - "integrity": "sha512-nkn9wPgFG/wHKpJWBnT67Jo58oYIBYKUYSQG0jz91dTDPyJnnejR7dgxfKjZPXxRLA9CZaqIu3m1czruhq//tQ==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction/-/jellyfish-transaction-0.29.0.tgz", + "integrity": "sha512-d2cTzZparx9DUM6vtCiMKT0v3+xlXN5NcwBA8xp6+DrXFlscRGVaKBgj/c4+QCE89pb9EwpfKowwQt+6LmVq5w==", "requires": { - "@defichain/jellyfish-crypto": "^0.27.0", + "@defichain/jellyfish-crypto": "^0.29.0", "smart-buffer": "^4.1.0" } }, "@defichain/jellyfish-transaction-builder": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction-builder/-/jellyfish-transaction-builder-0.27.0.tgz", - "integrity": "sha512-lwgRVhDV0yx0wX0lwwKVP0Nj0Ds7+WTuCemOzIbUuFvocct/FRelESZ+ceUL2mLy5VczDt1oOwX+hT87VYs8Ww==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction-builder/-/jellyfish-transaction-builder-0.29.0.tgz", + "integrity": "sha512-jm6I9DKBQofjmk0ASBUBnbjF1A7efHBQrB38OiNkOYTFk6PIbZHsW/8YsOg9JrtvoSYDYCKy0dys3x7g+la1mA==", "requires": { - "@defichain/jellyfish-crypto": "^0.27.0", - "@defichain/jellyfish-transaction": "^0.27.0", - "@defichain/jellyfish-transaction-signature": "^0.27.0" + "@defichain/jellyfish-crypto": "^0.29.0", + "@defichain/jellyfish-transaction": "^0.29.0", + "@defichain/jellyfish-transaction-signature": "^0.29.0" } }, "@defichain/jellyfish-transaction-signature": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction-signature/-/jellyfish-transaction-signature-0.27.0.tgz", - "integrity": "sha512-hUot6R9fqvut4CcCnvyt0AXJFgYONI+6ZdDFXtcJg2U+O/CFuhserxOW4525/qQVpxLFfRjt96CLHGecXlVtsg==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-transaction-signature/-/jellyfish-transaction-signature-0.29.0.tgz", + "integrity": "sha512-YVJVJRJXBpWv8Ajsl+VOP6STW1LLbaZwudvmemYYJBxRbqJQkxGT3xykDDJT6wnXGgO0aMDcPhx/S8zOhutViA==", "requires": { - "@defichain/jellyfish-crypto": "^0.27.0", - "@defichain/jellyfish-transaction": "^0.27.0", + "@defichain/jellyfish-crypto": "^0.29.0", + "@defichain/jellyfish-transaction": "^0.29.0", "smart-buffer": "^4.1.0" } }, "@defichain/jellyfish-wallet": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-wallet/-/jellyfish-wallet-0.27.0.tgz", - "integrity": "sha512-xN9rNO2iuMVbQ4lmdQH8CqQJsQl7W0F69Xz1fd5ECtjjHG0hv2V/HWI4LZpXJO/ihaB3ZT+3GKV58B2WIurjRw==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-wallet/-/jellyfish-wallet-0.29.0.tgz", + "integrity": "sha512-CcOFaqSJVOqSXjWwD4pfPsk8pTyifV+7eKz6+UstUVtj8cp3LzhPGdvGf/7TDdEMGp+HJwJEr/hTxbN13ukrTA==", "requires": { - "@defichain/jellyfish-address": "^0.27.0", - "@defichain/jellyfish-crypto": "^0.27.0", - "@defichain/jellyfish-network": "^0.27.0", - "@defichain/jellyfish-transaction": "^0.27.0" + "@defichain/jellyfish-address": "^0.29.0", + "@defichain/jellyfish-crypto": "^0.29.0", + "@defichain/jellyfish-network": "^0.29.0", + "@defichain/jellyfish-transaction": "^0.29.0" } }, "@defichain/jellyfish-wallet-mnemonic": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@defichain/jellyfish-wallet-mnemonic/-/jellyfish-wallet-mnemonic-0.27.0.tgz", - "integrity": "sha512-2omLfGCEPwsFMbU8asbGzuDht6LBapMErsXu6twrz8z7peijoPd1dQ9AXi6TkOwTfQobUf3SrMM2I7WuXa7A6A==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@defichain/jellyfish-wallet-mnemonic/-/jellyfish-wallet-mnemonic-0.29.0.tgz", + "integrity": "sha512-zSbMynMCmdkKf3iwbHhpL0dSG/OG+jPfTKKAy3AIpD8bQ9Tf5x2oielYOYSGfcpXggMAgmTeFp57wt8aUVVSiQ==", "requires": { - "@defichain/jellyfish-transaction": "^0.27.0", - "@defichain/jellyfish-wallet": "^0.27.0", + "@defichain/jellyfish-transaction": "^0.29.0", + "@defichain/jellyfish-wallet": "^0.29.0", "bip32": "^2.0.6", "bip39": "^3.0.4" } }, "@defichain/playground-api-client": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/@defichain/playground-api-client/-/playground-api-client-0.5.6.tgz", - "integrity": "sha512-NThDzgG5ylgBkKZKTWS1XTrHLuAvf9A5hJKDuEb+Ovcd2eZJtxw1f2D3/OAdLbr1dvTld/0QFmcG2SBZyLeoMg==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@defichain/playground-api-client/-/playground-api-client-0.6.0.tgz", + "integrity": "sha512-0Jn3EA+9vm1O0bfUVc1uLxBbCBenQLTZBCmBc3scHfZpnkY/4L2mgBmJ5Zs8OSpGJ1IovvjuDTf/Lm8whkZYjA==", "requires": { - "@defichain/jellyfish-api-core": ">=0.27.0", + "@defichain/jellyfish-api-core": ">=0.29.0", "abort-controller": "^3.0.0", "cross-fetch": "^3.1.2" } }, "@defichain/whale-api-client": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/@defichain/whale-api-client/-/whale-api-client-0.5.9.tgz", - "integrity": "sha512-/YRbsnyNn4qhtQjuoL7634xOVHcSYuYJXo8yI4JqHGzPiDoPVbsI3vMvAoZpNsNpR5aChi6y7O0ANifInV7XqQ==", + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/@defichain/whale-api-client/-/whale-api-client-0.5.10.tgz", + "integrity": "sha512-vYzj9mMsUrk2378EzOaqGe77RmKv9ZD70/pYZqhoB0gNBHjMflRr/ophTvvD4KJIyqna4Li397/XC7+uHayZlg==", "requires": { - "@defichain/jellyfish-api-core": ">=0.27.0", + "@defichain/jellyfish-api-core": ">=0.29.0", "abort-controller": "^3.0.0", "cross-fetch": "^3.1.2", "url-search-params-polyfill": "8.1.1" } }, "@defichain/whale-api-wallet": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/@defichain/whale-api-wallet/-/whale-api-wallet-0.5.9.tgz", - "integrity": "sha512-ZSDO1Hqm1SN1GeCcxpQktuYxCY+wyMrbF0/fsoc08NRceO8wpIC2qlbXy73i3ttCAsk1pAM8tLVc61agrWB0wQ==", + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/@defichain/whale-api-wallet/-/whale-api-wallet-0.5.10.tgz", + "integrity": "sha512-UnKzXKfSCgriweZmWJREWp5QZnynuaTkO4OeU4pundHlh2OGExutFrIRWTBXgATrHE9y8aLHBJH6rFiNxV9v6A==", "requires": { - "@defichain/jellyfish-transaction-builder": ">=0.27.0", - "@defichain/jellyfish-wallet": ">=0.27.0", - "@defichain/whale-api-client": "^0.5.9" + "@defichain/jellyfish-transaction-builder": ">=0.29.0", + "@defichain/jellyfish-wallet": ">=0.29.0", + "@defichain/whale-api-client": "^0.5.10" } }, "@egjs/hammerjs": { @@ -59299,9 +59299,9 @@ } }, "lossless-json": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lossless-json/-/lossless-json-1.0.4.tgz", - "integrity": "sha512-zEkWwELMSQQISdtOF44vk0bRJhN/PJ93qcgJLcodizQjxrJKdFrq2H1+Xv5QDe7v3dTYYbBI5hOsh4a9l0B2Ow==" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/lossless-json/-/lossless-json-1.0.5.tgz", + "integrity": "sha512-RicKUuLwZVNZ6ZdJHgIZnSeA05p8qWc5NW0uR96mpPIjN9WDLUg9+kj1esQU1GkPn9iLZVKatSQK5gyiaFHgJA==" }, "lower-case": { "version": "2.0.2", diff --git a/package.json b/package.json index 3768af09b8..f58e0b9766 100644 --- a/package.json +++ b/package.json @@ -17,16 +17,16 @@ "translation:missing": "ts-node app/translations/reporter/index.ts" }, "dependencies": { - "@defichain/jellyfish-address": ">=0.27.0", - "@defichain/jellyfish-api-core": ">=0.27.0", - "@defichain/jellyfish-network": ">=0.27.0", - "@defichain/jellyfish-transaction": ">=0.27.0", - "@defichain/jellyfish-transaction-builder": ">=0.27.0", - "@defichain/jellyfish-wallet": ">=0.27.0", - "@defichain/jellyfish-wallet-mnemonic": ">=0.27.0", - "@defichain/playground-api-client": ">=0.5.6", - "@defichain/whale-api-client": ">=0.5.9", - "@defichain/whale-api-wallet": ">=0.5.9", + "@defichain/jellyfish-address": ">=0.29.0", + "@defichain/jellyfish-api-core": ">=0.29.0", + "@defichain/jellyfish-network": ">=0.29.0", + "@defichain/jellyfish-transaction": ">=0.29.0", + "@defichain/jellyfish-transaction-builder": ">=0.29.0", + "@defichain/jellyfish-wallet": ">=0.29.0", + "@defichain/jellyfish-wallet-mnemonic": ">=0.29.0", + "@defichain/playground-api-client": ">=0.6.0", + "@defichain/whale-api-client": ">=0.5.10", + "@defichain/whale-api-wallet": ">=0.5.10", "@expo-google-fonts/ibm-plex-sans": "^0.2.0", "@expo/vector-icons": "^12.0.0", "@expo/webpack-config": "~0.12.63",