@tomo-inc/chains-service 0.0.10 → 0.0.16
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 +2 -2
- package/dist/index.js +2 -2
- package/package.json +2 -2
- package/project.json +15 -0
- package/src/evm/service.ts +2 -2
package/dist/index.cjs
CHANGED
|
@@ -4863,9 +4863,9 @@ var EvmService = class _EvmService extends BaseService {
|
|
|
4863
4863
|
}
|
|
4864
4864
|
}
|
|
4865
4865
|
async _queryGasInfo(txData) {
|
|
4866
|
-
const { tokenAddress, chainId, amount = 0, decimals = 9 } = txData;
|
|
4866
|
+
const { tokenAddress, chainId, amount = 0, decimals = 9, callData: txCallData } = txData;
|
|
4867
4867
|
const value = tokenAddress ? "0x1" : viem.toHex(viem.parseUnits(amount.toString(), decimals));
|
|
4868
|
-
let callData = "0x";
|
|
4868
|
+
let callData = txCallData || "0x";
|
|
4869
4869
|
if (tokenAddress) {
|
|
4870
4870
|
callData = createErc20TxData(txData, { decimals, address: tokenAddress })?.data;
|
|
4871
4871
|
}
|
package/dist/index.js
CHANGED
|
@@ -4855,9 +4855,9 @@ var EvmService = class _EvmService extends BaseService {
|
|
|
4855
4855
|
}
|
|
4856
4856
|
}
|
|
4857
4857
|
async _queryGasInfo(txData) {
|
|
4858
|
-
const { tokenAddress, chainId, amount = 0, decimals = 9 } = txData;
|
|
4858
|
+
const { tokenAddress, chainId, amount = 0, decimals = 9, callData: txCallData } = txData;
|
|
4859
4859
|
const value = tokenAddress ? "0x1" : toHex$1(parseUnits(amount.toString(), decimals));
|
|
4860
|
-
let callData = "0x";
|
|
4860
|
+
let callData = txCallData || "0x";
|
|
4861
4861
|
if (tokenAddress) {
|
|
4862
4862
|
callData = createErc20TxData(txData, { decimals, address: tokenAddress })?.data;
|
|
4863
4863
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomo-inc/chains-service",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"author": "tomo.inc",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"bitcoinjs-lib": "^7.0.0",
|
|
24
24
|
"crypto-js": "4.2.0",
|
|
25
25
|
"viem": "2.21.54",
|
|
26
|
-
"@tomo-inc/wallet-utils": "0.0.
|
|
26
|
+
"@tomo-inc/wallet-utils": "0.0.14"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/supertest": "^2.0.12",
|
package/project.json
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
"sourceRoot": "packages/chains-service/src",
|
|
4
4
|
"projectType": "library",
|
|
5
5
|
"targets": {
|
|
6
|
+
"version:up": {
|
|
7
|
+
"executor": "nx:run-commands",
|
|
8
|
+
"options": {
|
|
9
|
+
"cwd": "packages/chains-service",
|
|
10
|
+
"command": "npm version patch --no-git-tag-version"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
6
13
|
"build": {
|
|
7
14
|
"executor": "nx:run-commands",
|
|
8
15
|
"outputs": ["{projectRoot}/dist"],
|
|
@@ -53,6 +60,14 @@
|
|
|
53
60
|
"command": "vitest",
|
|
54
61
|
"cwd": "packages/chains-service"
|
|
55
62
|
}
|
|
63
|
+
},
|
|
64
|
+
"publish": {
|
|
65
|
+
"executor": "nx:run-commands",
|
|
66
|
+
"dependsOn": ["build"],
|
|
67
|
+
"options": {
|
|
68
|
+
"command": "pnpm publish --access public --no-git-checks --tag ${NPM_TAG:-latest}",
|
|
69
|
+
"cwd": "packages/chains-service"
|
|
70
|
+
}
|
|
56
71
|
}
|
|
57
72
|
},
|
|
58
73
|
"tags": ["npm:private", "scope:chains-service", "type:library"]
|
package/src/evm/service.ts
CHANGED
|
@@ -137,9 +137,9 @@ export class EvmService extends BaseService {
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
public async _queryGasInfo(txData: TransactionParams): Promise<QueryGasResponse> {
|
|
140
|
-
const { tokenAddress, chainId, amount = 0, decimals = 9 } = txData;
|
|
140
|
+
const { tokenAddress, chainId, amount = 0, decimals = 9, callData: txCallData } = txData;
|
|
141
141
|
const value = tokenAddress ? "0x1" : toHex(parseUnits(amount.toString(), decimals));
|
|
142
|
-
let callData = "0x";
|
|
142
|
+
let callData = txCallData || "0x";
|
|
143
143
|
if (tokenAddress) {
|
|
144
144
|
callData = createErc20TxData(txData, { decimals, address: tokenAddress })?.data;
|
|
145
145
|
}
|