From afb05e08c0c9f32e2b45bb217e4f8c038f14c60b Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Thu, 25 May 2023 10:00:38 +0800 Subject: [PATCH] add suggest chain to keplr --- src/modules/wallet/keplr.vue | 103 +++++++++++++++++++++++++++++++++++ src/stores/useDashboard.ts | 15 +++++ 2 files changed, 118 insertions(+) create mode 100644 src/modules/wallet/keplr.vue diff --git a/src/modules/wallet/keplr.vue b/src/modules/wallet/keplr.vue new file mode 100644 index 00000000..86ceca1f --- /dev/null +++ b/src/modules/wallet/keplr.vue @@ -0,0 +1,103 @@ + + + diff --git a/src/stores/useDashboard.ts b/src/stores/useDashboard.ts index 231a83a0..78fa9a17 100644 --- a/src/stores/useDashboard.ts +++ b/src/stores/useDashboard.ts @@ -78,6 +78,13 @@ export interface ChainConfig { providerChain: { api: Endpoint[] }; + // keplr config + keplrFeatures?: string[], + keplrPriceStep?: { + low: number, + average: number, + high: number, + }, } export interface LocalConfig { @@ -103,6 +110,12 @@ export interface LocalConfig { sdk_version: string; registry_name?: string; features?: string[]; + keplr_price_step?: { + low: number, + average: number, + high: number, + }, + keplr_features: string[], } function apiConverter(api: any[]) { @@ -151,6 +164,8 @@ export function fromLocal(lc: LocalConfig): ChainConfig { } conf.features = lc.features conf.logo = lc.logo; + conf.keplrFeatures = lc.keplr_features; + conf.keplrPriceStep = lc.keplr_price_step; return conf; }