diff --git a/app/src/main/java/com/cobo/cold/ui/fragment/main/TxFragment.java b/app/src/main/java/com/cobo/cold/ui/fragment/main/TxFragment.java index 150f094..938be78 100644 --- a/app/src/main/java/com/cobo/cold/ui/fragment/main/TxFragment.java +++ b/app/src/main/java/com/cobo/cold/ui/fragment/main/TxFragment.java @@ -108,8 +108,17 @@ public class TxFragment extends BaseFragment { if (output.optBoolean("isChange")) { continue; } + + long value; + Object valueObj = output.get("value"); + if (valueObj instanceof Long) { + value = (Long) valueObj; + } else { + double satoshi = Double.parseDouble(((String) valueObj).split(" ")[0]); + value = (long) (satoshi * Math.pow(10,8)); + } items.add(new TransactionItem(i, - output.getLong("value"), + value, output.getString("address") )); } diff --git a/app/src/main/res/layout/qrcode_scan_fragment.xml b/app/src/main/res/layout/qrcode_scan_fragment.xml index 2df3448..edf8d30 100644 --- a/app/src/main/res/layout/qrcode_scan_fragment.xml +++ b/app/src/main/res/layout/qrcode_scan_fragment.xml @@ -94,6 +94,7 @@ android:layout_marginHorizontal="16dp" android:textColor="@android:color/white" android:textSize="12sp" + android:gravity="center" android:text="@string/scan_electrum_hint"/> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ad0511a..24ebe41 100755 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -218,7 +218,7 @@ To Fee Memo - Confirm Transaction + Confirm Transaction Details Sign Forgot Password Only install firmware upgrades downloaded from the official Cobo Vault website. @@ -293,7 +293,7 @@ 1. Open Electrum and create a new wallet. \n2. Choose “Standard wallet”. \n3. Choose “Use a master key”. \n4. Touch “Show Master Public Key” below then click the camera icon in the “Create keystore from a master key” window in Electrum to scan the QR code that displays on Cobo Vault. \n5. Set a password. \n6. Enter the watch-only wallet. Show Master Public Key - How to create watch-only wallet in Electrum + How to create a watch-only wallet in Electrum: From %d Input %d Output %d @@ -305,10 +305,10 @@ Please make sure the file you wish to sign was successfully saved to your microSD card. How to Broadcast In Electrum, go to Tools > Load Transaction > From QR Code\n\nDifficulty scanning? You can export the signed transaction data as a file using a microSD card and broadcast the transaction from a file with Electrum. - Parsing Failed + Read Error How to scan QR code 1. Open Electrumand and create a new wallet.\n2. Choose “Standard wallet”.\n3. Choose “Use a master key”. \n4. Click the camera icon in the “Create keystore from a master key” window in Electrum to scan the QR code that displays on Cobo Vault.\n\nDifficulty scanning? You can also export the master public key file using a microSD card. - Unable to parse file, please try exporting again. + Unable to read file, please try importing again. Export File to Broadcast In Electrum, go to Tools > Load Transaction > From File to open the file. Please make sure you have inserted a FAT32 format microSD card with capacity 32GB or less. @@ -325,11 +325,11 @@ File name: Master Public Key (Nested SegWit) or touch here to export via microSD.]]> - Difficulty scanning Electrum? You can export the pending transactions as a file using a microSD card (Menu > MicroSD Card) - Files Awaiting Signature - This transaction can\'t be recognized, your Cobo Vault doesn’t match the watch-only wallet. + Difficulty scanning? You can import pending transactions from Electrum using a microSD card (Menu > MicroSD Card). + Unsigned Transaction Files + Transaction not recognized. Your Cobo Vault has not been successfully paired with the watch-only wallet. Change - Electrum Compatibility + Electrum Watch-Only Wallet Identification Failed From Electrum Update failed