From 6b4b2529c803581b13e1604acd230dff24c839b4 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Thu, 3 Sep 2020 09:37:25 +0200 Subject: [PATCH] correct wallet model names --- .../com/sparrowwallet/drongo/wallet/WalletModel.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/drongo/wallet/WalletModel.java b/src/main/java/com/sparrowwallet/drongo/wallet/WalletModel.java index 6bcaec6..2ab15af 100644 --- a/src/main/java/com/sparrowwallet/drongo/wallet/WalletModel.java +++ b/src/main/java/com/sparrowwallet/drongo/wallet/WalletModel.java @@ -1,7 +1,7 @@ package com.sparrowwallet.drongo.wallet; public enum WalletModel { - SEED, SPARROW, BITCOIN_CORE, ELECTRUM, TREZOR_1, TREZOR_T, COLDCARD, LEDGER, DIGITALBITBOX, KEEPKEY; + SEED, SPARROW, BITCOIN_CORE, ELECTRUM, TREZOR_1, TREZOR_T, COLDCARD, LEDGER_NANO_S, LEDGER_NANO_X, DIGITALBITBOX_01, KEEPKEY; public static WalletModel getModel(String model) { return valueOf(model.toUpperCase()); @@ -12,6 +12,14 @@ public enum WalletModel { return "trezor"; } + if(this == LEDGER_NANO_S || this == LEDGER_NANO_X) { + return "ledger"; + } + + if(this == DIGITALBITBOX_01) { + return "digitalbitbox"; + } + return this.toString().toLowerCase(); }