Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 81a6371

Browse files
author
Yutaro Mori
authored
Fix u64.fromBuffer return type to u64 (#830)
1 parent 24b4514 commit 81a6371

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

token-swap/js/client/token-swap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class Numberu64 extends BN {
4343
*/
4444
static fromBuffer(buffer: typeof Buffer): Numberu64 {
4545
assert(buffer.length === 8, `Invalid buffer length: ${buffer.length}`);
46-
return new BN(
46+
return new Numberu64(
4747
[...buffer]
4848
.reverse()
4949
.map(i => `00${i.toString(16)}`.slice(-2))

token/js/client/token.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class u64 extends BN {
5151
*/
5252
static fromBuffer(buffer: typeof Buffer): u64 {
5353
assert(buffer.length === 8, `Invalid buffer length: ${buffer.length}`);
54-
return new BN(
54+
return new u64(
5555
[...buffer]
5656
.reverse()
5757
.map(i => `00${i.toString(16)}`.slice(-2))

0 commit comments

Comments
 (0)