@rabby-wallet/gnosis-sdk 1.4.8-alpha-4 → 1.4.8-alpha-5
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/utils.js +4 -4
- package/package.json +1 -1
- package/src/utils.ts +5 -5
package/dist/utils.js
CHANGED
|
@@ -88,11 +88,11 @@ export async function estimateTxGas(safeAddress, safeContract, provider, to, val
|
|
|
88
88
|
export async function standardizeSafeTransactionData(safeAddress, safeContract, provider, tx, network, version) {
|
|
89
89
|
const standardizedTxs = {
|
|
90
90
|
to: tx.to,
|
|
91
|
-
value: tx.value
|
|
92
|
-
data: tx.data,
|
|
91
|
+
value: `${tx.value ?? "0"}`,
|
|
92
|
+
data: tx.data || "0x",
|
|
93
93
|
operation: tx.operation ?? OperationType.Call,
|
|
94
|
-
baseGas: tx.baseGas ?? "0"
|
|
95
|
-
gasPrice: tx.gasPrice ?? "0"
|
|
94
|
+
baseGas: `${tx.baseGas ?? "0"}`,
|
|
95
|
+
gasPrice: `${tx.gasPrice ?? "0"}`,
|
|
96
96
|
gasToken: tx.gasToken || ZERO_ADDRESS,
|
|
97
97
|
refundReceiver: tx.refundReceiver || ZERO_ADDRESS,
|
|
98
98
|
nonce: tx.nonce ?? (await safeContract.nonce()).toNumber(),
|
package/package.json
CHANGED
package/src/utils.ts
CHANGED
|
@@ -121,13 +121,13 @@ export async function standardizeSafeTransactionData(
|
|
|
121
121
|
network: string,
|
|
122
122
|
version: string
|
|
123
123
|
): Promise<SafeTransactionData> {
|
|
124
|
-
const standardizedTxs = {
|
|
124
|
+
const standardizedTxs: Omit<SafeTransactionData, "safeTxGas"> = {
|
|
125
125
|
to: tx.to,
|
|
126
|
-
value: tx.value
|
|
127
|
-
data: tx.data,
|
|
126
|
+
value: `${tx.value ?? "0"}`,
|
|
127
|
+
data: tx.data || "0x",
|
|
128
128
|
operation: tx.operation ?? OperationType.Call,
|
|
129
|
-
baseGas: tx.baseGas ?? "0"
|
|
130
|
-
gasPrice: tx.gasPrice ?? "0"
|
|
129
|
+
baseGas: `${tx.baseGas ?? "0"}`,
|
|
130
|
+
gasPrice: `${tx.gasPrice ?? "0"}`,
|
|
131
131
|
gasToken: tx.gasToken || ZERO_ADDRESS,
|
|
132
132
|
refundReceiver: tx.refundReceiver || ZERO_ADDRESS,
|
|
133
133
|
nonce: tx.nonce ?? (await safeContract.nonce()).toNumber(),
|