@pioneer-platform/pioneer-sdk 8.15.9 → 8.15.12

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 CHANGED
@@ -2027,9 +2027,6 @@ async function createUnsignedRippleTx(caip, to, amount, memo, pubkeys, pioneer,
2027
2027
  to_address: to
2028
2028
  }
2029
2029
  };
2030
- if (desttag !== undefined) {
2031
- msg.DestinationTag = desttag;
2032
- }
2033
2030
  let tx = {
2034
2031
  type: "auth/StdTx",
2035
2032
  value: {
@@ -2042,18 +2039,16 @@ async function createUnsignedRippleTx(caip, to, amount, memo, pubkeys, pioneer,
2042
2039
  ],
2043
2040
  gas: "28000"
2044
2041
  },
2045
- memo: memo || "",
2042
+ memo: " ",
2046
2043
  msg: [msg],
2047
2044
  signatures: null
2048
2045
  }
2049
2046
  };
2050
2047
  const payment = {
2051
2048
  amount,
2052
- destination: to
2049
+ destination: to,
2050
+ destinationTag: desttag ? String(desttag) : "0"
2053
2051
  };
2054
- if (desttag !== undefined) {
2055
- payment.destinationTag = desttag;
2056
- }
2057
2052
  let unsignedTx = {
2058
2053
  addressNList: [2147483692, 2147483792, 2147483648, 0, 0],
2059
2054
  tx,
package/dist/index.es.js CHANGED
@@ -2211,9 +2211,6 @@ async function createUnsignedRippleTx(caip, to, amount, memo, pubkeys, pioneer,
2211
2211
  to_address: to
2212
2212
  }
2213
2213
  };
2214
- if (desttag !== undefined) {
2215
- msg.DestinationTag = desttag;
2216
- }
2217
2214
  let tx = {
2218
2215
  type: "auth/StdTx",
2219
2216
  value: {
@@ -2226,18 +2223,16 @@ async function createUnsignedRippleTx(caip, to, amount, memo, pubkeys, pioneer,
2226
2223
  ],
2227
2224
  gas: "28000"
2228
2225
  },
2229
- memo: memo || "",
2226
+ memo: " ",
2230
2227
  msg: [msg],
2231
2228
  signatures: null
2232
2229
  }
2233
2230
  };
2234
2231
  const payment = {
2235
2232
  amount,
2236
- destination: to
2233
+ destination: to,
2234
+ destinationTag: desttag ? String(desttag) : "0"
2237
2235
  };
2238
- if (desttag !== undefined) {
2239
- payment.destinationTag = desttag;
2240
- }
2241
2236
  let unsignedTx = {
2242
2237
  addressNList: [2147483692, 2147483792, 2147483648, 0, 0],
2243
2238
  tx,
package/dist/index.js CHANGED
@@ -2211,9 +2211,6 @@ async function createUnsignedRippleTx(caip, to, amount, memo, pubkeys, pioneer,
2211
2211
  to_address: to
2212
2212
  }
2213
2213
  };
2214
- if (desttag !== undefined) {
2215
- msg.DestinationTag = desttag;
2216
- }
2217
2214
  let tx = {
2218
2215
  type: "auth/StdTx",
2219
2216
  value: {
@@ -2226,18 +2223,16 @@ async function createUnsignedRippleTx(caip, to, amount, memo, pubkeys, pioneer,
2226
2223
  ],
2227
2224
  gas: "28000"
2228
2225
  },
2229
- memo: memo || "",
2226
+ memo: " ",
2230
2227
  msg: [msg],
2231
2228
  signatures: null
2232
2229
  }
2233
2230
  };
2234
2231
  const payment = {
2235
2232
  amount,
2236
- destination: to
2233
+ destination: to,
2234
+ destinationTag: desttag ? String(desttag) : "0"
2237
2235
  };
2238
- if (desttag !== undefined) {
2239
- payment.destinationTag = desttag;
2240
- }
2241
2236
  let unsignedTx = {
2242
2237
  addressNList: [2147483692, 2147483792, 2147483648, 0, 0],
2243
2238
  tx,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "highlander",
3
3
  "name": "@pioneer-platform/pioneer-sdk",
4
- "version": "8.15.9",
4
+ "version": "8.15.12",
5
5
  "dependencies": {
6
6
  "@keepkey/keepkey-sdk": "^0.2.62",
7
7
  "@pioneer-platform/loggerdog": "^8.11.0",
@@ -79,7 +79,8 @@ export async function createUnsignedRippleTx(
79
79
  amount = amount.toString();
80
80
  }
81
81
 
82
- // Build message - only include DestinationTag if provided
82
+ // Build message - destination tag is NOT part of the msg structure
83
+ // It's only used in the payment object for KeepKey signing
83
84
  const msg: any = {
84
85
  type: 'ripple-sdk/MsgSend',
85
86
  value: {
@@ -93,9 +94,7 @@ export async function createUnsignedRippleTx(
93
94
  to_address: to,
94
95
  },
95
96
  };
96
- if (desttag !== undefined) {
97
- msg.DestinationTag = desttag;
98
- }
97
+ // Note: DestinationTag is handled in the payment object, NOT in msg
99
98
 
100
99
  let tx = {
101
100
  type: 'auth/StdTx',
@@ -109,20 +108,20 @@ export async function createUnsignedRippleTx(
109
108
  ],
110
109
  gas: '28000',
111
110
  },
112
- memo: memo || '',
111
+ // memo is NOT used for destination tags on XRP
112
+ // Destination tags are numeric IDs, not memos
113
+ memo: ' ',
113
114
  msg: [msg],
114
115
  signatures: null,
115
116
  },
116
117
  };
117
118
 
118
- // Build payment object - only include destinationTag if provided
119
+ // Build payment object - destinationTag must be numeric string (use "0" when not provided)
119
120
  const payment: any = {
120
121
  amount,
121
122
  destination: to,
123
+ destinationTag: desttag ? String(desttag) : '0', // Numeric string when provided, "0" when not
122
124
  };
123
- if (desttag !== undefined) {
124
- payment.destinationTag = desttag;
125
- }
126
125
 
127
126
  //Unsigned TX
128
127
  let unsignedTx = {