@pafi-dev/core 0.6.2 → 0.7.0
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.
- package/dist/index.cjs +10 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -9
- package/dist/index.d.ts +19 -9
- package/dist/index.js +11 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -396,26 +396,19 @@ function buildPerpDepositViaRelay(params) {
|
|
|
396
396
|
throw new Error("buildPerpDepositViaRelay: relayAddress required");
|
|
397
397
|
}
|
|
398
398
|
const operations = [];
|
|
399
|
-
if (params.
|
|
400
|
-
if (!params.
|
|
399
|
+
if (params.gasFeeUsdc && params.gasFeeUsdc > 0n) {
|
|
400
|
+
if (!params.gasFeeUsdcRecipient) {
|
|
401
401
|
throw new Error(
|
|
402
|
-
"buildPerpDepositViaRelay:
|
|
402
|
+
"buildPerpDepositViaRelay: gasFeeUsdcRecipient required when gasFeeUsdc > 0"
|
|
403
403
|
);
|
|
404
404
|
}
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
value: 0n,
|
|
413
|
-
data: _viem.encodeFunctionData.call(void 0, {
|
|
414
|
-
abi: _viem.erc20Abi,
|
|
415
|
-
functionName: "transfer",
|
|
416
|
-
args: [params.gasFeePtRecipient, params.gasFeePt]
|
|
417
|
-
})
|
|
418
|
-
});
|
|
405
|
+
operations.push(
|
|
406
|
+
erc20TransferOp(
|
|
407
|
+
params.request.token,
|
|
408
|
+
params.gasFeeUsdcRecipient,
|
|
409
|
+
params.gasFeeUsdc
|
|
410
|
+
)
|
|
411
|
+
);
|
|
419
412
|
}
|
|
420
413
|
operations.push(
|
|
421
414
|
erc20ApproveOp(
|