@rabby-wallet/gnosis-sdk 1.0.3 → 1.2.1
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/api.js +2 -2
- package/dist/index.js +2 -1
- package/package.json +3 -2
- package/src/api.ts +2 -2
- package/src/index.ts +2 -1
package/dist/api.js
CHANGED
|
@@ -20,7 +20,7 @@ export default class RequestProvider {
|
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
getPendingTransactions(safeAddress, nonce) {
|
|
23
|
-
return this.request.get(`/safes/${safeAddress}/multisig-transactions/`, {
|
|
23
|
+
return this.request.get(`/safes/${toChecksumAddress(safeAddress)}/multisig-transactions/`, {
|
|
24
24
|
params: {
|
|
25
25
|
executed: false,
|
|
26
26
|
nonce__gte: nonce,
|
|
@@ -31,7 +31,7 @@ export default class RequestProvider {
|
|
|
31
31
|
return this.request.post(`/safes/${toChecksumAddress(safeAddres)}/multisig-transactions/`, data);
|
|
32
32
|
}
|
|
33
33
|
getSafeInfo(safeAddress) {
|
|
34
|
-
return this.request.get(`/safes/${safeAddress}/`);
|
|
34
|
+
return this.request.get(`/safes/${toChecksumAddress(safeAddress)}/`);
|
|
35
35
|
}
|
|
36
36
|
confirmTransaction(hash, data) {
|
|
37
37
|
return this.request.post(`/multisig-transactions/${hash}/confirmations/`, data);
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Contract } from "ethers";
|
|
2
2
|
import { BigNumber } from "@ethersproject/bignumber";
|
|
3
|
+
import BN from 'bignumber.js';
|
|
3
4
|
import { getSafeSingletonDeployment } from "@gnosis.pm/safe-deployments";
|
|
4
5
|
import { toChecksumAddress } from "web3-utils";
|
|
5
6
|
import SafeTransaction from "@gnosis.pm/safe-core-sdk/dist/src/utils/transactions/SafeTransaction";
|
|
@@ -96,7 +97,7 @@ class Safe {
|
|
|
96
97
|
await this.request.postTransactions(this.safeAddress, {
|
|
97
98
|
safe: safeAddress,
|
|
98
99
|
to: toChecksumAddress(transaction.data.to),
|
|
99
|
-
value:
|
|
100
|
+
value: new BN(transaction.data.value).toFixed(),
|
|
100
101
|
data: transaction.data.data,
|
|
101
102
|
operation: transaction.data.operation,
|
|
102
103
|
gasToken: transaction.data.gasToken,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rabby-wallet/gnosis-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -16,8 +16,9 @@
|
|
|
16
16
|
"@ethersproject/solidity": "^5.5.0",
|
|
17
17
|
"@gnosis.pm/safe-core-sdk": "^1.0.0",
|
|
18
18
|
"@gnosis.pm/safe-core-sdk-types": "^0.1.1",
|
|
19
|
-
"@gnosis.pm/safe-deployments": "^1.
|
|
19
|
+
"@gnosis.pm/safe-deployments": "^1.15.0",
|
|
20
20
|
"axios": "^0.24.0",
|
|
21
|
+
"bignumber.js": "^9.0.2",
|
|
21
22
|
"ethereumjs-util": "^7.1.3",
|
|
22
23
|
"ethers": "^5.5.1",
|
|
23
24
|
"typescript": "^4.4.4",
|
package/src/api.ts
CHANGED
|
@@ -76,7 +76,7 @@ export default class RequestProvider {
|
|
|
76
76
|
safeAddress: string,
|
|
77
77
|
nonce: number
|
|
78
78
|
): Promise<{ results: SafeTransactionItem[] }> {
|
|
79
|
-
return this.request.get(`/safes/${safeAddress}/multisig-transactions/`, {
|
|
79
|
+
return this.request.get(`/safes/${toChecksumAddress(safeAddress)}/multisig-transactions/`, {
|
|
80
80
|
params: {
|
|
81
81
|
executed: false,
|
|
82
82
|
nonce__gte: nonce,
|
|
@@ -92,7 +92,7 @@ export default class RequestProvider {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
getSafeInfo(safeAddress: string): Promise<SafeInfo> {
|
|
95
|
-
return this.request.get(`/safes/${safeAddress}/`);
|
|
95
|
+
return this.request.get(`/safes/${toChecksumAddress(safeAddress)}/`);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
confirmTransaction(hash: string, data): Promise<void> {
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Contract } from "ethers";
|
|
2
2
|
import { BigNumber } from "@ethersproject/bignumber";
|
|
3
|
+
import BN from 'bignumber.js';
|
|
3
4
|
import { getSafeSingletonDeployment } from "@gnosis.pm/safe-deployments";
|
|
4
5
|
import { providers } from "ethers";
|
|
5
6
|
import { toChecksumAddress } from "web3-utils";
|
|
@@ -161,7 +162,7 @@ class Safe {
|
|
|
161
162
|
await this.request.postTransactions(this.safeAddress, {
|
|
162
163
|
safe: safeAddress,
|
|
163
164
|
to: toChecksumAddress(transaction.data.to),
|
|
164
|
-
value:
|
|
165
|
+
value: new BN(transaction.data.value).toFixed(),
|
|
165
166
|
data: transaction.data.data,
|
|
166
167
|
operation: transaction.data.operation,
|
|
167
168
|
gasToken: transaction.data.gasToken,
|