Skip to content

Commit

Permalink
chore(Release): v4.53.2
Browse files Browse the repository at this point in the history
  • Loading branch information
plondon committed Aug 2, 2021
1 parent b581149 commit 803b071
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "blockchain-wallet-v4",
"version": "4.53.1",
"version": "4.53.2",
"license": "AGPL-3.0-or-later",
"private": true,
"author": {
Expand Down
72 changes: 63 additions & 9 deletions packages/blockchain-wallet-v4-frontend/src/store/index.spec.js
Expand Up @@ -57,7 +57,66 @@ describe('App Store Config', () => {
}
}
}
const fakeCurrencies = {
const fakeCustodials = {
currencies: [
{
name: 'Algorand',
precision: 6,
products: ['MercuryDeposits', 'MercuryWithdrawals', 'CustodialWalletBalance'],
symbol: 'ALGO',
type: {
logoPngUrl:
'https://raw.githubusercontent.com/blockchain/coin-definitions/master/extensions/blockchains/algorand/info/logo.png',
minimumOnChainConfirmations: 1,
name: 'COIN'
}
},
{
name: 'Cosmos',
precision: 6,
products: [],
symbol: 'ATOM',
type: {
logoPngUrl:
'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/cosmos/info/logo.png',
minimumOnChainConfirmations: 0,
name: 'COIN'
}
},
{
name: 'Balancer',
precision: 18,
products: ['PrivateKey'],
symbol: 'BAL',
type: {
erc20Address: '0xba100000625a3754423978a60c9317c58a424e3D',
logoPngUrl:
'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xba100000625a3754423978a60c9317c58a424e3D/logo.png',
name: 'ERC20',
parentChain: 'ETH',
websiteUrl: 'https://balancer.finance'
}
},
{
name: 'Dogecoin',
precision: 8,
products: [
'MercuryDeposits',
'MercuryWithdrawals',
'InterestBalance',
'CustodialWalletBalance'
],
symbol: 'DOGE',
type: {
logoPngUrl:
'https://raw.githubusercontent.com/blockchain/coin-definitions/master/extensions/blockchains/doge/info/logo.png',
minimumOnChainConfirmations: 40,
name: 'COIN'
}
}
]
}
const fakeErc20s = {
currencies: [
{
name: 'Aave',
Expand Down Expand Up @@ -131,12 +190,7 @@ describe('App Store Config', () => {
// setup fetch mock
fetch.resetMocks()
fetch.mockResponseOnce(JSON.stringify(fakeWalletOptions))
fetch.mockImplementation((url) => {
if (url === `${fakeWalletOptions.domains.api}/assets/currencies/erc20`) {
return Promise.resolve({ json: () => fakeCurrencies })
}
return Promise.resolve(new Response(JSON.stringify({})))
})
fetch.mockResponseOnce(JSON.stringify(fakeErc20s))

// setup spies
composeSpy = jest.spyOn(Redux, 'compose').mockImplementation(jest.fn())
Expand All @@ -156,9 +210,9 @@ describe('App Store Config', () => {
// wallet options
expect(fetch.mock.calls).toHaveLength(2)
expect(fetch.mock.calls[0][0]).toEqual('/wallet-options-v4.json')
// erc coins
// custodial and erc20 coins
expect(fetch.mock.calls[1][0]).toEqual(
`${fakeWalletOptions.domains.api}/assets/currencies/erc20`
`${fakeWalletOptions.domains.api}/assets/currencies/custodial`
)
// socket registration
expect(Socket.mock.calls).toHaveLength(1)
Expand Down

0 comments on commit 803b071

Please sign in to comment.