aboutsummaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/utils/constants.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-12-19 12:23:39 -0300
committerSebastian <sebasjm@gmail.com>2022-12-19 12:23:39 -0300
commit72b429321553841ac1ff48cf974bfc65da01bb06 (patch)
tree7db9a4462f02de6cb86de695a1e64772b00ead5f /packages/merchant-backoffice-ui/src/utils/constants.ts
parent770ab6f01dc81a16f384f314982bd761540f8e65 (diff)
downloadwallet-core-72b429321553841ac1ff48cf974bfc65da01bb06.tar.xz
pretty
Diffstat (limited to 'packages/merchant-backoffice-ui/src/utils/constants.ts')
-rw-r--r--packages/merchant-backoffice-ui/src/utils/constants.ts33
1 files changed, 18 insertions, 15 deletions
diff --git a/packages/merchant-backoffice-ui/src/utils/constants.ts b/packages/merchant-backoffice-ui/src/utils/constants.ts
index 90f133c6a..fea9cb7e2 100644
--- a/packages/merchant-backoffice-ui/src/utils/constants.ts
+++ b/packages/merchant-backoffice-ui/src/utils/constants.ts
@@ -15,26 +15,30 @@
*/
/**
-*
-* @author Sebastian Javier Marchano (sebasjm)
-*/
+ *
+ * @author Sebastian Javier Marchano (sebasjm)
+ */
//https://tools.ietf.org/html/rfc8905
-export const PAYTO_REGEX = /^payto:\/\/[a-zA-Z][a-zA-Z0-9-.]+(\/[a-zA-Z0-9\-\.\~\(\)@_%:!$&'*+,;=]*)*\??((amount|receiver-name|sender-name|instruction|message)=[a-zA-Z0-9\-\.\~\(\)@_%:!$'*+,;=]*&?)*$/
-export const PAYTO_WIRE_METHOD_LOOKUP = /payto:\/\/([a-zA-Z][a-zA-Z0-9-.]+)\/.*/
+export const PAYTO_REGEX =
+ /^payto:\/\/[a-zA-Z][a-zA-Z0-9-.]+(\/[a-zA-Z0-9\-\.\~\(\)@_%:!$&'*+,;=]*)*\??((amount|receiver-name|sender-name|instruction|message)=[a-zA-Z0-9\-\.\~\(\)@_%:!$'*+,;=]*&?)*$/;
+export const PAYTO_WIRE_METHOD_LOOKUP =
+ /payto:\/\/([a-zA-Z][a-zA-Z0-9-.]+)\/.*/;
-export const AMOUNT_REGEX = /^[a-zA-Z][a-zA-Z]*:[0-9][0-9,]*\.?[0-9,]*$/
+export const AMOUNT_REGEX = /^[a-zA-Z][a-zA-Z]*:[0-9][0-9,]*\.?[0-9,]*$/;
-export const INSTANCE_ID_LOOKUP = /\/instances\/([^/]*)\/?$/
+export const INSTANCE_ID_LOOKUP = /\/instances\/([^/]*)\/?$/;
-export const AMOUNT_ZERO_REGEX = /^[a-zA-Z][a-zA-Z]*:0$/
+export const AMOUNT_ZERO_REGEX = /^[a-zA-Z][a-zA-Z]*:0$/;
-export const CROCKFORD_BASE32_REGEX = /^[0123456789ABCDEFGHJKMNPQRSTVWXYZ]+[*~$=U]*$/
+export const CROCKFORD_BASE32_REGEX =
+ /^[0123456789ABCDEFGHJKMNPQRSTVWXYZ]+[*~$=U]*$/;
-export const URL_REGEX = /^((https?:)(\/\/\/?)([\w]*(?::[\w]*)?@)?([\d\w\.-]+)(?::(\d+))?)\/$/
+export const URL_REGEX =
+ /^((https?:)(\/\/\/?)([\w]*(?::[\w]*)?@)?([\d\w\.-]+)(?::(\d+))?)\/$/;
// how much rows we add every time user hit load more
-export const PAGE_SIZE = 20
+export const PAGE_SIZE = 20;
// how bigger can be the result set
// after this threshold, load more with move the cursor
export const MAX_RESULT_SIZE = PAGE_SIZE * 2 - 1;
@@ -44,7 +48,7 @@ export const DEFAULT_REQUEST_TIMEOUT = 10;
export const MAX_IMAGE_SIZE = 1024 * 1024;
-export const INSTANCE_ID_REGEX = /^[a-zA-Z0-9][a-zA-Z0-9_.@-]+$/
+export const INSTANCE_ID_REGEX = /^[a-zA-Z0-9][a-zA-Z0-9_.@-]+$/;
export const COUNTRY_TABLE = {
AE: "U.A.E.",
@@ -189,6 +193,5 @@ export const COUNTRY_TABLE = {
VN: "Viet Nam",
YE: "Yemen",
ZA: "South Africa",
- ZW: "Zimbabwe"
-}
-
+ ZW: "Zimbabwe",
+};