Skip to content

Commit 8baa0a0

Browse files
committed
feat(meme): hide meme coins from supported list
1 parent 47e8430 commit 8baa0a0

File tree

7 files changed

+25
-7
lines changed

7 files changed

+25
-7
lines changed

packages/blockchain-wallet-v4-frontend/src/components/Form/SelectBoxCoin/selectors.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ export const getData = (state) => {
1414
(products.includes('PrivateKey') ||
1515
products.includes('CustodialWalletBalance') ||
1616
products.includes('DynamicSelfCustody')) &&
17-
coinfig.type.name !== 'FIAT'
17+
coinfig.type.name !== 'FIAT' &&
18+
!coinfig.categories.some((cat) => cat?.id === 'MEME')
1819
)
1920
})
2021
.map((coinfig) => ({ text: coinfig.name, value: coinfig.symbol }))

packages/blockchain-wallet-v4-frontend/src/modals/BuySell/CheckoutConfirm/models/quoteSummaryViewModel.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import * as QuoteSummaryViewModel from './quoteSummaryViewModel'
66
const makeCoins = (): Coins => ({
77
BTC: {
88
coinfig: {
9+
categories: [],
910
displaySymbol: 'BTC',
1011
name: 'Bitcoin',
1112
precision: 8,
@@ -22,6 +23,7 @@ const makeCoins = (): Coins => ({
2223
},
2324
USD: {
2425
coinfig: {
26+
categories: [],
2527
displaySymbol: 'USD',
2628
name: 'US Dollar',
2729
precision: 2,

packages/blockchain-wallet-v4-frontend/src/modals/Swap/EnterAmount/test-utils/makeCoinfig.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export const makeCoinfig = () => ({
2+
categories: [],
23
displaySymbol: '',
34
name: '',
45
precision: 10,

packages/blockchain-wallet-v4-frontend/src/store/worker.assets.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@ addEventListener('message', ({ data }) => {
1818
let assets = {}
1919
const supportedCoins = custodialAssets.currencies.concat(erc20Assets.currencies)
2020

21-
supportedCoins.forEach((coin) => {
22-
assets[coin.symbol] = { coinfig: coin }
23-
})
21+
supportedCoins
22+
.filter((coin) => !coin.categories.some((cat) => cat?.id === 'MEME'))
23+
.forEach((coin) => {
24+
console.log('coin', coin)
25+
assets[coin.symbol] = { coinfig: coin }
26+
})
2427

2528
assets.MATIC.coinfig.type.logoPngUrl = assets['MATIC.MATIC'].coinfig.type.logoPngUrl
2629
assets.STX.coinfig.products.push('DynamicSelfCustody')

packages/blockchain-wallet-v4/src/redux/data/coins/selectors.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import * as selectors from './selectors'
33
const COINS_STUB: Window['coins'] = {
44
USDC: {
55
coinfig: {
6+
categories: [],
67
displaySymbol: 'USDC',
78
name: 'USD Coin',
89
precision: 6,

packages/blockchain-wallet-v4/src/redux/walletOptions/types.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@ import { CoinType, RemoteDataType, WalletFiatType } from '../../types'
33

44
export type WalletOptionsType = typeof WalletOptions
55

6+
type Category = {
7+
description: string
8+
id: string
9+
name: string
10+
}
11+
612
export type CoinfigType = {
13+
categories: Category[]
714
displaySymbol: string
815
name: string
916
precision: number

typings/window.d.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@ declare global {
2020
// build injected recaptcha key
2121
SARDINE_CLIENT_ID: string
2222
// build injected sardine access key
23-
SARDINE_ENVIRONMENT: string // sardine environment sandbox or production
24-
_Sardine: any // Sardine integration
25-
_SardineContext: any // Sardine integration
23+
SARDINE_ENVIRONMENT: string
24+
// Sardine integration
2625
WALLET_V5_LINK: string
26+
// sardine environment sandbox or production
27+
_Sardine: any
28+
// Sardine integration
29+
_SardineContext: any
2730
coins: Coins
2831
grecaptcha: any // google recaptcha sets this on window
2932
history?: {

0 commit comments

Comments
 (0)