fix(client): make Client.decodeAddress() return a BigInt, not Long
This commit is contained in:
+1
-2
@@ -10,7 +10,6 @@ import {
|
|||||||
KeepAlive
|
KeepAlive
|
||||||
} from './Protocol.js'
|
} from './Protocol.js'
|
||||||
import { EventEmitter } from 'events'
|
import { EventEmitter } from 'events'
|
||||||
import Long from 'long'
|
|
||||||
|
|
||||||
const WebSocket = (typeof window === 'undefined' ? import('ws'): window.WebSocket)
|
const WebSocket = (typeof window === 'undefined' ? import('ws'): window.WebSocket)
|
||||||
|
|
||||||
@@ -21,7 +20,7 @@ export class Client extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static decodeAddress(address) {
|
static decodeAddress(address) {
|
||||||
return Long.fromString(BigInt('0x' + address.replace(/:/g, '')).toString(10))
|
return BigInt('0x' + address.replace(/:/g, '')).toString(10)
|
||||||
}
|
}
|
||||||
|
|
||||||
#gateway
|
#gateway
|
||||||
|
|||||||
Reference in New Issue
Block a user