Skip to content

Commit 718505f

Browse files
committed
correct type
1 parent adfcd77 commit 718505f

File tree

2 files changed

+21
-25
lines changed

2 files changed

+21
-25
lines changed

electron-ui/cc_wallet/cc_wallet_renderer.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -200,26 +200,23 @@ function get_wallet_summaries_response(data){
200200
var type = wallet["type"]
201201
var id = i
202202
var name = wallet["type"]
203-
if (type=="STANDARD_WALLET"){
204-
name = "Chia Wallet"
205-
type = "Chia"
206-
} else if (name=="COLOURED_COIN") {
207-
name = "CC Wallet"
208-
type = wallet["name"]
209-
if (type.length > 18) {
210-
type = type.substring(0,18);
211-
type = type.concat("...")
212-
}
213-
}
214203
get_wallet_balance(id)
215204
//href, wallet_name, wallet_description, wallet_amount
216205
var href = ""
217206
if (type == "STANDARD_WALLET") {
218207
href = "../wallet-dark.html"
208+
name = "Chia Wallet"
209+
type = "Chia"
219210
} else if (type == "RATE_LIMITED") {
220211
href = "../rl_wallet/rl_wallet.html"
221212
} else if (type == "COLOURED_COIN") {
222213
href = "../cc_wallet/cc_wallet.html"
214+
name = "CC Wallet"
215+
type = wallet["name"]
216+
if (type.length > 18) {
217+
type = type.substring(0,18);
218+
type = type.concat("...")
219+
}
223220
}
224221

225222
if (id == g_wallet_id) {

electron-ui/renderer.js

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ function get_wallets_response(data) {
568568
var name = wallet["name"]
569569
get_wallet_balance(id)
570570
//href, wallet_name, wallet_description, wallet_amount
571+
console.log("type is " + type)
571572
var href = ""
572573
if (type == "STANDARD_WALLET") {
573574
href = "wallet-dark.html"
@@ -614,26 +615,24 @@ function get_wallet_summaries_response(data){
614615
var type = wallet["type"]
615616
var id = i
616617
var name = wallet["type"]
617-
if (type=="STANDARD_WALLET"){
618-
name = "Chia Wallet"
619-
type = "Chia"
620-
} else if (name=="COLOURED_COIN") {
621-
name = "CC Wallet"
622-
type = wallet["name"]
623-
if (type.length > 18) {
624-
type = type.substring(0,18);
625-
type = type.concat("...")
626-
}
627-
}
618+
628619
get_wallet_balance(id)
629620
//href, wallet_name, wallet_description, wallet_amount
630621
var href = ""
631622
if (type == "STANDARD_WALLET") {
632-
href = "../wallet-dark.html"
623+
href = "./wallet-dark.html"
624+
name = "Chia Wallet"
625+
type = "Chia"
633626
} else if (type == "RATE_LIMITED") {
634-
href = "../rl_wallet/rl_wallet.html"
627+
href = "rl_wallet/rl_wallet.html"
635628
} else if (type == "COLOURED_COIN") {
636-
href = "../cc_wallet/cc_wallet.html"
629+
href = "cc_wallet/cc_wallet.html"
630+
name = "CC Wallet"
631+
type = wallet["name"]
632+
if (type.length > 18) {
633+
type = type.substring(0,18);
634+
type = type.concat("...")
635+
}
637636
}
638637

639638
if (id == g_wallet_id) {

0 commit comments

Comments
 (0)