@silentswap/sdk 0.0.80 → 0.0.82

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.
@@ -2353,6 +2353,17 @@
2353
2353
  "00D49B"
2354
2354
  ]
2355
2355
  },
2356
+ "eip155:137/erc20:0xcfde7c43edb3c9f71331aac1003b099ce40c94ea": {
2357
+ "caip19": "eip155:137/erc20:0xcfde7c43edb3c9f71331aac1003b099ce40c94ea",
2358
+ "coingeckoId": "gift",
2359
+ "name": "GIFT",
2360
+ "symbol": "GIFT",
2361
+ "decimals": 18,
2362
+ "gradient": [
2363
+ "8B5CF6",
2364
+ "A78BFA"
2365
+ ]
2366
+ },
2356
2367
  "eip155:10/erc20:0x01bFF41798a0BcF287b996046Ca68b395DbC1071": {
2357
2368
  "caip19": "eip155:10/erc20:0x01bFF41798a0BcF287b996046Ca68b395DbC1071",
2358
2369
  "coingeckoId": "usdt0",
@@ -457,7 +457,12 @@ forceProvider) {
457
457
  relayParams.recipient = DEAD_ADDRESS;
458
458
  }
459
459
  }
460
- // For EVM to EVM, no recipient field is needed
460
+ else {
461
+ // EVM to EVM: use custom recipient when provided (e.g. send to another address)
462
+ if (recipientAddress && recipientAddress.startsWith('0x')) {
463
+ relayParams.recipient = recipientAddress;
464
+ }
465
+ }
461
466
  const quote = await fetchRelayQuote(relayParams, signal);
462
467
  return quote;
463
468
  }
@@ -526,9 +531,11 @@ forceProvider) {
526
531
  else {
527
532
  // Both source and destination are EVM
528
533
  // API requires dstChainTokenOutRecipient, srcChainOrderAuthorityAddress, dstChainOrderAuthorityAddress for transaction construction
529
- debridgeParams.dstChainTokenOutRecipient = userAddress;
534
+ // Use recipientAddress when provided (user-set recipient), otherwise fall back to userAddress (send to self)
535
+ const evmRecipient = recipientAddress && recipientAddress.startsWith('0x') ? recipientAddress : userAddress;
536
+ debridgeParams.dstChainTokenOutRecipient = evmRecipient;
530
537
  debridgeParams.srcChainOrderAuthorityAddress = userAddress;
531
- debridgeParams.dstChainOrderAuthorityAddress = userAddress;
538
+ debridgeParams.dstChainOrderAuthorityAddress = evmRecipient;
532
539
  debridgeParams.srcChainRefundAddress = userAddress;
533
540
  debridgeParams.senderAddress = userAddress;
534
541
  debridgeParams.dstChainTokenOutAmount = 'auto';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@silentswap/sdk",
3
3
  "type": "module",
4
- "version": "0.0.80",
4
+ "version": "0.0.82",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
7
7
  "files": [
@@ -2353,6 +2353,17 @@
2353
2353
  "00D49B"
2354
2354
  ]
2355
2355
  },
2356
+ "eip155:137/erc20:0xcfde7c43edb3c9f71331aac1003b099ce40c94ea": {
2357
+ "caip19": "eip155:137/erc20:0xcfde7c43edb3c9f71331aac1003b099ce40c94ea",
2358
+ "coingeckoId": "gift",
2359
+ "name": "GIFT",
2360
+ "symbol": "GIFT",
2361
+ "decimals": 18,
2362
+ "gradient": [
2363
+ "8B5CF6",
2364
+ "A78BFA"
2365
+ ]
2366
+ },
2356
2367
  "eip155:10/erc20:0x01bFF41798a0BcF287b996046Ca68b395DbC1071": {
2357
2368
  "caip19": "eip155:10/erc20:0x01bFF41798a0BcF287b996046Ca68b395DbC1071",
2358
2369
  "coingeckoId": "usdt0",