Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Commit bccebcb

Browse files
committed
fix: withdraw amount can be a string
1 parent 5fe11dd commit bccebcb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dataunion/DataUnion.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export class DataUnion {
235235
/** @internal */
236236
async _createWithdrawSignature(amountTokenWei: BigNumber|number|string, to: EthereumAddress, withdrawn: BigNumber, signer: JsonRpcSigner) {
237237
// @ts-expect-error
238-
const message = to + hexZeroPad(amountTokenWei, 32).slice(2) + this.getSidechainAddress().slice(2) + hexZeroPad(withdrawn, 32).slice(2)
238+
const message = to + hexZeroPad(BigNumber.from(amountTokenWei), 32).slice(2) + this.getSidechainAddress().slice(2) + hexZeroPad(withdrawn, 32).slice(2)
239239
const signature = await signer.signMessage(arrayify(message))
240240
return signature
241241
}

0 commit comments

Comments
 (0)