aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-01-02 15:18:58 -0800
committerAdam Soltys <[email protected]>2024-01-02 15:18:58 -0800
commita9c9badaf8823422526fb78369ca94ec16d6c11a (patch)
tree81db583c95094fda89fc10559dcc63e00cdb9b5c /src/lib/utils.js
parent0c98884cdd9d21fc9327c0b395e5498077489cd0 (diff)
downloadcoinos-ui-a9c9badaf8823422526fb78369ca94ec16d6c11a.tar.gz
coinos-ui-a9c9badaf8823422526fb78369ca94ec16d6c11a.zip
liquid payments
Diffstat (limited to 'src/lib/utils.js')
-rw-r--r--src/lib/utils.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/utils.js b/src/lib/utils.js
index 9dbdc2ab..738413bf 100644
--- a/src/lib/utils.js
+++ b/src/lib/utils.js
@@ -287,3 +287,17 @@ export let closest = (a, n) =>
a.reduce((prev, curr) =>
Math.abs(curr - n) < Math.abs(prev - n) ? curr : prev
);
+
+export let isLiquid = (text) =>
+ text.startsWith("Az") ||
+ text.startsWith("lq1") ||
+ text.startsWith("VJL") ||
+ text.startsWith("VT") ||
+ text.startsWith("XR") ||
+ text.startsWith("XC") ||
+ ((text.startsWith("H") || text.startsWith("G") || text.startsWith("Q")) &&
+ text.length === 34) ||
+ (text.startsWith("ert1q") && text.length === 43) ||
+ (text.startsWith("ex1q") && text.length === 42) ||
+ text.startsWith("el1qq") ||
+ text.startsWith("lq1qq");