@atomiqlabs/chain-starknet 4.0.0-dev.7 → 4.0.0-dev.8
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.
|
@@ -35,7 +35,7 @@ class StarknetSwapInit extends StarknetSwapModule_1.StarknetSwapModule {
|
|
|
35
35
|
* @private
|
|
36
36
|
*/
|
|
37
37
|
Init(swapData, timeout, signature) {
|
|
38
|
-
return new StarknetAction_1.StarknetAction(swapData.payIn ? swapData.offerer : swapData.claimer, this.root, this.swapContract.populateTransaction.initialize(swapData.toEscrowStruct(), signature, timeout, swapData.extraData == null || swapData.extraData === "" ? [] : (0, Utils_1.bufferToBytes31Span)(buffer_1.Buffer.from(swapData.extraData, "hex")).map(Utils_1.toHex)), swapData.payIn ? StarknetSwapInit.GasCosts.INIT_PAY_IN : StarknetSwapInit.GasCosts.INIT);
|
|
38
|
+
return new StarknetAction_1.StarknetAction(swapData.payIn ? swapData.offerer : swapData.claimer, this.root, this.swapContract.populateTransaction.initialize(swapData.toEscrowStruct(), signature ?? [], timeout, swapData.extraData == null || swapData.extraData === "" ? [] : (0, Utils_1.bufferToBytes31Span)(buffer_1.Buffer.from(swapData.extraData, "hex")).map(Utils_1.toHex)), swapData.payIn ? StarknetSwapInit.GasCosts.INIT_PAY_IN : StarknetSwapInit.GasCosts.INIT);
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* Returns auth prefix to be used with a specific swap, payIn=true & payIn=false use different prefixes (these
|
package/package.json
CHANGED
|
@@ -52,7 +52,7 @@ export class StarknetSwapInit extends StarknetSwapModule {
|
|
|
52
52
|
this.root,
|
|
53
53
|
this.swapContract.populateTransaction.initialize(
|
|
54
54
|
swapData.toEscrowStruct(),
|
|
55
|
-
signature,
|
|
55
|
+
signature ?? [],
|
|
56
56
|
timeout,
|
|
57
57
|
swapData.extraData==null || swapData.extraData==="" ? [] : bufferToBytes31Span(Buffer.from(swapData.extraData, "hex")).map(toHex)
|
|
58
58
|
),
|