From 56318a3170dc5e1674fca986ded814d5161fd391 Mon Sep 17 00:00:00 2001 From: manihagh <47037057+manihagh@users.noreply.github.com> Date: Mon, 15 Jul 2019 11:41:33 +0200 Subject: [PATCH] Update KeyFactory.ts "BigInt" is not supported on Safari and iOS, therefore generateKey will fail. It is reproducible using the React example as well. Changing to Number solved the issue for me and works on iOS and Safari. --- packages/libra-web-account/KeyFactory.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/libra-web-account/KeyFactory.ts b/packages/libra-web-account/KeyFactory.ts index 1065a64..245d124 100644 --- a/packages/libra-web-account/KeyFactory.ts +++ b/packages/libra-web-account/KeyFactory.ts @@ -51,7 +51,7 @@ export class KeyFactory { public generateKey(childDepth: number): KeyPair { // const childDepthBuffer = toBufferLE(BigInt(childDepth), 8) const childDepthBuffer = Buffer.from( - BigInt(childDepth) + Number(childDepth) .toString(16) .padStart(16, '0') .slice(0, 16),