Skip to content

Commit 0f8d909

Browse files
committed
refactor: extract protected newToCrypto array
deprecate wallets-check.yml workflow
1 parent 0f16955 commit 0f8d909

File tree

4 files changed

+22
-41
lines changed

4 files changed

+22
-41
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99

1010
# Owners of specific files
1111
/src/data/consensus-bounty-hunters.json @djrtwo @asanso @fredriksvantes
12+
/src/data/wallets/new-to-crypto.ts @konopkja @minimalsm

.github/workflows/wallets-check.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/data/wallets/new-to-crypto.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import type { WalletName } from "./wallet-data"
2+
3+
export const newToCrypto: WalletName[] = [
4+
"Coinbase Wallet",
5+
"Rainbow",
6+
"MEW wallet",
7+
"Zerion Wallet",
8+
"OneKey",
9+
]

src/data/wallets/wallet-data.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { WalletData } from "@/lib/types"
22

3+
import { newToCrypto } from "./new-to-crypto"
4+
35
import OneInchWalletImage from "@/public/images/wallets/1inch.png"
46
import AlphaWalletImage from "@/public/images/wallets/alpha.png"
57
import AmbireImage from "@/public/images/wallets/ambire.png"
@@ -39,7 +41,7 @@ import UnstoppableWalletImage from "@/public/images/wallets/unstoppable.png"
3941
import XDEFIImage from "@/public/images/wallets/xdefi.png"
4042
import ZerionImage from "@/public/images/wallets/zerion.png"
4143

42-
export const walletsData: WalletData[] = [
44+
const walletsData = [
4345
{
4446
last_updated: "2022-06-22",
4547
name: "Keystone",
@@ -229,7 +231,6 @@ export const walletsData: WalletData[] = [
229231
social_recovery: false,
230232
onboard_documentation: "https://www.coinbase.com/wallet/tutorials",
231233
documentation: "",
232-
new_to_crypto: true,
233234
// note: "Community contribution, let's follow up with Coinbase",
234235
},
235236
{
@@ -764,7 +765,6 @@ export const walletsData: WalletData[] = [
764765
social_recovery: false,
765766
onboard_documentation: "https://www.mewtopia.com/",
766767
documentation: "https://help.myetherwallet.com/en/",
767-
new_to_crypto: true,
768768
},
769769
{
770770
last_updated: "2022-06-24",
@@ -1061,7 +1061,6 @@ export const walletsData: WalletData[] = [
10611061
social_recovery: false,
10621062
onboard_documentation: "https://learn.rainbow.me/",
10631063
documentation: "",
1064-
new_to_crypto: true,
10651064
},
10661065
{
10671066
last_updated: "2024-09-01",
@@ -1311,7 +1310,6 @@ export const walletsData: WalletData[] = [
13111310
social_recovery: false,
13121311
onboard_documentation: "",
13131312
documentation: "",
1314-
new_to_crypto: false,
13151313
},
13161314
{
13171315
last_updated: "2024-09-26",
@@ -1371,7 +1369,6 @@ export const walletsData: WalletData[] = [
13711369
onboard_documentation:
13721370
"https://help.zerion.io/en/collections/5525626-zerion-wallet",
13731371
documentation: "https://help.zerion.io/en/",
1374-
new_to_crypto: true,
13751372
},
13761373
{
13771374
last_updated: "2022-08-31",
@@ -1613,7 +1610,6 @@ export const walletsData: WalletData[] = [
16131610
social_recovery: false,
16141611
onboard_documentation: "https://help.onekey.so/hc/en-us",
16151612
documentation: "https://developer.onekey.so/guide/introduction",
1616-
new_to_crypto: true,
16171613
},
16181614
{
16191615
last_updated: "2023-04-21",
@@ -2008,6 +2004,13 @@ export const walletsData: WalletData[] = [
20082004
onboard_documentation: "https://docs.gemwallet.com/",
20092005
documentation: "https://docs.gemwallet.com/",
20102006
},
2011-
]
2007+
] as const satisfies Omit<WalletData, "new_to_crypto">[]
2008+
2009+
export type WalletName = (typeof walletsData)[number]["name"]
2010+
2011+
const allWalletData = walletsData.map((wallet) => ({
2012+
...wallet,
2013+
new_to_crypto: newToCrypto.includes(wallet.name),
2014+
})) as WalletData[]
20122015

2013-
export default walletsData
2016+
export default allWalletData

0 commit comments

Comments
 (0)