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

Commit 7acfe43

Browse files
committed
refactor: use supported parameter type when calling hexZeroPad()
1 parent bccebcb commit 7acfe43

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/dataunion/DataUnion.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,7 @@ export class DataUnion {
234234

235235
/** @internal */
236236
async _createWithdrawSignature(amountTokenWei: BigNumber|number|string, to: EthereumAddress, withdrawn: BigNumber, signer: JsonRpcSigner) {
237-
// @ts-expect-error
238-
const message = to + hexZeroPad(BigNumber.from(amountTokenWei), 32).slice(2) + this.getSidechainAddress().slice(2) + hexZeroPad(withdrawn, 32).slice(2)
237+
const message = to + hexZeroPad(BigNumber.from(amountTokenWei).toHexString(), 32).slice(2) + this.getSidechainAddress().slice(2) + hexZeroPad(withdrawn.toHexString(), 32).slice(2)
239238
const signature = await signer.signMessage(arrayify(message))
240239
return signature
241240
}

0 commit comments

Comments
 (0)