@tomo-inc/cubist-wallet-sdk 0.0.8 → 0.0.10
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 +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/cube-sign.ts +1 -2
package/dist/index.cjs
CHANGED
|
@@ -766,7 +766,7 @@ var recoverEVMTxData = (unsignedTx, numberType) => {
|
|
|
766
766
|
try {
|
|
767
767
|
const { data, types } = JSON.parse(unsignedTx);
|
|
768
768
|
for (const prop in types) {
|
|
769
|
-
if (types[prop] === "bigint") {
|
|
769
|
+
if (types[prop] === "bigint" && (data?.[prop] ?? "").toString()?.length > 0) {
|
|
770
770
|
data[prop] = BigInt(data[prop]);
|
|
771
771
|
if (numberType === "string") {
|
|
772
772
|
data[prop] = data[prop].toString();
|
package/dist/index.js
CHANGED
|
@@ -759,7 +759,7 @@ var recoverEVMTxData = (unsignedTx, numberType) => {
|
|
|
759
759
|
try {
|
|
760
760
|
const { data, types } = JSON.parse(unsignedTx);
|
|
761
761
|
for (const prop in types) {
|
|
762
|
-
if (types[prop] === "bigint") {
|
|
762
|
+
if (types[prop] === "bigint" && (data?.[prop] ?? "").toString()?.length > 0) {
|
|
763
763
|
data[prop] = BigInt(data[prop]);
|
|
764
764
|
if (numberType === "string") {
|
|
765
765
|
data[prop] = data[prop].toString();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomo-inc/cubist-wallet-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"author": "tomo.inc",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"axios": "^1.11.0",
|
|
21
21
|
"crypto-js": "^4.2.0",
|
|
22
22
|
"@tomo-inc/cubist-sig-sdk": "1.1.0",
|
|
23
|
-
"@tomo-inc/wallet-utils": "0.0.
|
|
23
|
+
"@tomo-inc/wallet-utils": "0.0.8"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/crypto-js": "^4.2.2",
|
package/src/cube-sign.ts
CHANGED
|
@@ -19,9 +19,8 @@ export const recoverEVMTxData = (unsignedTx: string, numberType?: "bigint" | "st
|
|
|
19
19
|
const { data, types } = JSON.parse(unsignedTx);
|
|
20
20
|
|
|
21
21
|
// https://viem.sh/docs/actions/wallet/signTransaction#value-optional
|
|
22
|
-
|
|
23
22
|
for (const prop in types) {
|
|
24
|
-
if (types[prop] === "bigint") {
|
|
23
|
+
if (types[prop] === "bigint" && (data?.[prop] ?? "").toString()?.length > 0) {
|
|
25
24
|
data[prop] = BigInt(data[prop]);
|
|
26
25
|
if (numberType === "string") {
|
|
27
26
|
data[prop] = data[prop].toString();
|