Skip to content

Commit

Permalink
Merge pull request ethereum#14185 from ethereum/new-to-crypto-wallets
Browse files Browse the repository at this point in the history
refactor: extract protected newToCrypto array
  • Loading branch information
corwintines authored Nov 18, 2024
2 parents 74595c6 + 4e1b569 commit c92e797
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 41 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@

# Owners of specific files
/src/data/consensus-bounty-hunters.json @djrtwo @asanso @fredriksvantes
/src/data/wallets/new-to-crypto.ts @konopkja @minimalsm
32 changes: 0 additions & 32 deletions .github/workflows/wallets-check.yml

This file was deleted.

9 changes: 9 additions & 0 deletions src/data/wallets/new-to-crypto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { WalletName } from "./wallet-data"

export const newToCrypto: WalletName[] = [
"Coinbase Wallet",
"Rainbow",
"MEW wallet",
"Zerion Wallet",
"OneKey",
]
21 changes: 12 additions & 9 deletions src/data/wallets/wallet-data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { WalletData } from "@/lib/types"

import { newToCrypto } from "./new-to-crypto"

import OneInchWalletImage from "@/public/images/wallets/1inch.png"
import AlphaWalletImage from "@/public/images/wallets/alpha.png"
import AmbireImage from "@/public/images/wallets/ambire.png"
Expand Down Expand Up @@ -40,7 +42,7 @@ import TrustWalletImage from "@/public/images/wallets/trustwallet.png"
import UnstoppableWalletImage from "@/public/images/wallets/unstoppable.png"
import ZerionImage from "@/public/images/wallets/zerion.png"

export const walletsData: WalletData[] = [
const walletsData = [
{
last_updated: "2024-10-30",
name: "Keystone",
Expand Down Expand Up @@ -235,7 +237,6 @@ export const walletsData: WalletData[] = [
social_recovery: false,
onboard_documentation: "https://www.coinbase.com/wallet/tutorials",
documentation: "",
new_to_crypto: true,
// note: "Community contribution, let's follow up with Coinbase",
},
{
Expand Down Expand Up @@ -789,7 +790,6 @@ export const walletsData: WalletData[] = [
social_recovery: false,
onboard_documentation: "https://www.mewtopia.com/",
documentation: "https://help.myetherwallet.com/en/",
new_to_crypto: true,
},
{
last_updated: "2022-06-24",
Expand Down Expand Up @@ -1092,7 +1092,6 @@ export const walletsData: WalletData[] = [
social_recovery: false,
onboard_documentation: "https://learn.rainbow.me/",
documentation: "",
new_to_crypto: true,
},
{
last_updated: "2024-09-01",
Expand Down Expand Up @@ -1335,7 +1334,6 @@ export const walletsData: WalletData[] = [
social_recovery: false,
onboard_documentation: "",
documentation: "",
new_to_crypto: false,
},
{
last_updated: "2024-09-26",
Expand Down Expand Up @@ -1396,7 +1394,6 @@ export const walletsData: WalletData[] = [
onboard_documentation:
"https://help.zerion.io/en/collections/5525626-zerion-wallet",
documentation: "https://help.zerion.io/en/",
new_to_crypto: true,
},
{
last_updated: "2022-08-31",
Expand Down Expand Up @@ -1642,7 +1639,6 @@ export const walletsData: WalletData[] = [
social_recovery: false,
onboard_documentation: "https://help.onekey.so/hc/en-us",
documentation: "https://developer.onekey.so/guide/introduction",
new_to_crypto: true,
},
{
last_updated: "2023-04-21",
Expand Down Expand Up @@ -2081,6 +2077,13 @@ export const walletsData: WalletData[] = [
onboard_documentation: "https://clear-wallet.flashsoft.eu/",
documentation: "https://clear-wallet.flashsoft.eu/docs/",
},
]
] as const satisfies Omit<WalletData, "new_to_crypto">[]

export type WalletName = (typeof walletsData)[number]["name"]

const allWalletData = walletsData.map((wallet) => ({
...wallet,
new_to_crypto: newToCrypto.includes(wallet.name),
})) as WalletData[]

export default walletsData
export default allWalletData

0 comments on commit c92e797

Please sign in to comment.