[bisq-network/bisq] Refactor desktop's BsqSendView 'sendbsq', share with api (#4801)

Stan notifications at github.com
Wed Dec 2 19:24:48 CET 2020


@ghubstan commented on this pull request.



> @@ -331,6 +342,25 @@ private void verifyEncryptedWalletIsUnlocked() {
             throw new IllegalStateException("wallet is locked");
     }
 
+    // Returns a LegacyAddress for the string, or a RuntimeException if invalid.
+    private LegacyAddress getValidBsqLegacyAddress(String address) {
+        try {
+            return bsqFormatter.getAddressFromBsqAddress(address);
+        } catch (Throwable t) {
+            log.error("", t);
+            throw new IllegalStateException(format("%s is not a valid bsq address", address));
+        }
+    }
+
+    // Returns a Coin for the double amount, or a RuntimeException if invalid.
+    private Coin getValidBsqTransferAmount(double amount) {

Commit 7f636e45f995db168501b0772ed13d4a1eb231f1 ensures that any BSQ amt < dust is invalid. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4801#discussion_r534386512
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201202/9e68bf46/attachment.htm>


More information about the bisq-github mailing list