diff options
Diffstat (limited to 'packages/order-utils/src/utils.ts')
-rw-r--r-- | packages/order-utils/src/utils.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/order-utils/src/utils.ts b/packages/order-utils/src/utils.ts new file mode 100644 index 000000000..3b465cece --- /dev/null +++ b/packages/order-utils/src/utils.ts @@ -0,0 +1,9 @@ +export const utils = { + getSignatureTypeIndexIfExists(signature: string): number { + // tslint:disable-next-line:custom-no-magic-numbers + const signatureTypeHex = signature.slice(-2); + const base = 16; + const signatureTypeInt = parseInt(signatureTypeHex, base); + return signatureTypeInt; + }, +}; |