fix: compile error

This commit is contained in:
bartosz-lipinski 2021-03-12 16:21:29 -06:00
parent 5b123a4ebf
commit a9fc4dbf8d
1 changed files with 19 additions and 19 deletions

View File

@ -54,7 +54,7 @@ export const fromSolana = async (
'pending', 'pending',
); );
request.amountBN = ethers.utils.parseUnits( const amountBN = ethers.utils.parseUnits(
request.amount.toString(), request.amount.toString(),
request.info.decimals, request.info.decimals,
); );
@ -196,24 +196,24 @@ export const fromSolana = async (
connection.removeAccountChangeListener(accountChangeListener); connection.removeAccountChangeListener(accountChangeListener);
connection.removeSlotChangeListener(slotUpdateListener); connection.removeSlotChangeListener(slotUpdateListener);
let signatures = await bridge.fetchSignatureStatus( // let signatures = await bridge.fetchSignatureStatus(
lockup.signatureAccount, // lockup.signatureAccount,
); // );
let sigData = Buffer.of( // let sigData = Buffer.of(
...signatures.reduce((previousValue, currentValue) => { // ...signatures.reduce((previousValue, currentValue) => {
previousValue.push(currentValue.index); // previousValue.push(currentValue.index);
previousValue.push(...currentValue.signature); // previousValue.push(...currentValue.signature);
return previousValue; // return previousValue;
}, new Array<number>()), // }, new Array<number>()),
); // );
vaa = Buffer.concat([ // vaa = Buffer.concat([
vaa.slice(0, 5), // vaa.slice(0, 5),
Buffer.of(signatures.length), // Buffer.of(signatures.length),
sigData, // sigData,
vaa.slice(6), // vaa.slice(6),
]); // ]);
// transferVAA = vaa // transferVAA = vaa
try { try {
await steps.postVAA(request); await steps.postVAA(request);
@ -234,13 +234,13 @@ export const fromSolana = async (
// loading: true, // loading: true,
// message: "Sign the claim...", // message: "Sign the claim...",
// }) // })
let tx = await wh.submitVAA(vaa); // let tx = await wh.submitVAA(vaa);
// setLoading({ // setLoading({
// ...loading, // ...loading,
// loading: true, // loading: true,
// message: "Waiting for tokens unlock to be mined...", // message: "Waiting for tokens unlock to be mined...",
// }) // })
await tx.wait(1); // await tx.wait(1);
// message.success({content: "Execution of VAA succeeded", key: "eth_tx"}) // message.success({content: "Execution of VAA succeeded", key: "eth_tx"})
}, },
}; };