@atomiqlabs/chain-starknet 4.0.0-dev.37 → 4.0.0-dev.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -55,7 +55,7 @@ export declare class StarknetSpvVaultContract extends StarknetContractBase<typeo
|
|
|
55
55
|
private parseWithdrawalEvent;
|
|
56
56
|
getWithdrawalStates(withdrawalTxs: {
|
|
57
57
|
withdrawal: StarknetSpvWithdrawalData;
|
|
58
|
-
|
|
58
|
+
scStartBlockheight?: number;
|
|
59
59
|
}[]): Promise<{
|
|
60
60
|
[btcTxId: string]: SpvWithdrawalState;
|
|
61
61
|
}>;
|
|
@@ -236,11 +236,11 @@ class StarknetSpvVaultContract extends StarknetContractBase_1.StarknetContractBa
|
|
|
236
236
|
lows.push((0, Utils_1.toHex)(txHashU256.low));
|
|
237
237
|
highs.push((0, Utils_1.toHex)(txHashU256.high));
|
|
238
238
|
if (startHeight !== null) {
|
|
239
|
-
if (withdrawalTx.
|
|
239
|
+
if (withdrawalTx.scStartBlockheight == null) {
|
|
240
240
|
startHeight = null;
|
|
241
241
|
}
|
|
242
242
|
else {
|
|
243
|
-
startHeight = Math.min(startHeight ?? Infinity, withdrawalTx.
|
|
243
|
+
startHeight = Math.min(startHeight ?? Infinity, withdrawalTx.scStartBlockheight);
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
});
|
package/package.json
CHANGED
|
@@ -297,7 +297,7 @@ export class StarknetSpvVaultContract
|
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
async getWithdrawalStates(withdrawalTxs: {withdrawal: StarknetSpvWithdrawalData,
|
|
300
|
+
async getWithdrawalStates(withdrawalTxs: {withdrawal: StarknetSpvWithdrawalData, scStartBlockheight?: number}[]): Promise<{[btcTxId: string]: SpvWithdrawalState}> {
|
|
301
301
|
const result: {[btcTxId: string]: SpvWithdrawalState} = {};
|
|
302
302
|
withdrawalTxs.forEach(withdrawalTx => {
|
|
303
303
|
result[withdrawalTx.withdrawal.getTxId()] = {
|
|
@@ -319,10 +319,10 @@ export class StarknetSpvVaultContract
|
|
|
319
319
|
lows.push(toHex(txHashU256.low));
|
|
320
320
|
highs.push(toHex(txHashU256.high));
|
|
321
321
|
if(startHeight!==null) {
|
|
322
|
-
if(withdrawalTx.
|
|
322
|
+
if(withdrawalTx.scStartBlockheight==null) {
|
|
323
323
|
startHeight = null;
|
|
324
324
|
} else {
|
|
325
|
-
startHeight = Math.min(startHeight ?? Infinity, withdrawalTx.
|
|
325
|
+
startHeight = Math.min(startHeight ?? Infinity, withdrawalTx.scStartBlockheight);
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
});
|