Skip to content

Commit

Permalink
Update KeyFactory.ts
Browse files Browse the repository at this point in the history
"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.
  • Loading branch information
manihagh authored Jul 15, 2019
1 parent 1bf41fc commit 56318a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/libra-web-account/KeyFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 56318a3

Please sign in to comment.