Fix tests on 32 bit platforms
This commit is contained in:
parent
c819ba1be1
commit
9635f26b90
|
@ -10,10 +10,14 @@ proc example*(_: type UInt256): UInt256 =
|
||||||
b = rand(byte)
|
b = rand(byte)
|
||||||
UInt256.fromBytes(bytes)
|
UInt256.fromBytes(bytes)
|
||||||
|
|
||||||
|
proc example*(_: type UInt48): UInt48 =
|
||||||
|
# workaround for https://github.com/nim-lang/Nim/issues/17670
|
||||||
|
uint64.rand mod (UInt48.high + 1)
|
||||||
|
|
||||||
proc example*(_: type SignedState): SignedState =
|
proc example*(_: type SignedState): SignedState =
|
||||||
var wallet = Wallet.init(EthPrivateKey.random())
|
var wallet = Wallet.init(EthPrivateKey.random())
|
||||||
let hub, asset, receiver = EthAddress.example
|
let hub, asset, receiver = EthAddress.example
|
||||||
let chainId, amount = UInt256.example
|
let chainId, amount = UInt256.example
|
||||||
let nonce = UInt48.rand()
|
let nonce = UInt48.example
|
||||||
let channel = wallet.openLedgerChannel(hub, chainId, nonce, asset, amount).get
|
let channel = wallet.openLedgerChannel(hub, chainId, nonce, asset, amount).get
|
||||||
wallet.pay(channel, asset, receiver, amount).get
|
wallet.pay(channel, asset, receiver, amount).get
|
||||||
|
|
Loading…
Reference in New Issue