@rabby-wallet/gnosis-sdk 1.3.3 → 1.3.4

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.d.ts CHANGED
@@ -24,7 +24,10 @@ declare class Safe {
24
24
  * @returns
25
25
  */
26
26
  static getSafeInfo(safeAddress: string, network: string): Promise<SafeInfo>;
27
- static getPendingTransactions(safeAddress: string, network: string): Promise<{
27
+ static getPendingTransactions(safeAddress: string, network: string, nonce: number): Promise<{
28
+ results: import("./api").SafeTransactionItem[];
29
+ }>;
30
+ getPendingTransactions(): Promise<{
28
31
  results: import("./api").SafeTransactionItem[];
29
32
  }>;
30
33
  static getSafeVersion({ address, provider, }: {
package/dist/index.js CHANGED
@@ -49,13 +49,16 @@ class Safe {
49
49
  const request = new RequestProvider(network, Safe.adapter);
50
50
  return request.getSafeInfo(toChecksumAddress(safeAddress));
51
51
  }
52
- static async getPendingTransactions(safeAddress, network) {
52
+ static async getPendingTransactions(safeAddress, network, nonce) {
53
53
  const request = new RequestProvider(network, Safe.adapter);
54
- const nonce = (await request.getSafeInfo(toChecksumAddress(safeAddress)))
55
- .nonce;
56
54
  const transactions = await request.getPendingTransactions(safeAddress, nonce);
57
55
  return transactions;
58
56
  }
57
+ async getPendingTransactions() {
58
+ const nonce = await this.getNonce();
59
+ const transactions = await this.request.getPendingTransactions(this.safeAddress, nonce);
60
+ return transactions;
61
+ }
59
62
  static async getSafeVersion({ address, provider, }) {
60
63
  const contract = new Contract(address, [
61
64
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/gnosis-sdk",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -68,10 +68,12 @@ class Safe {
68
68
  return request.getSafeInfo(toChecksumAddress(safeAddress));
69
69
  }
70
70
 
71
- static async getPendingTransactions(safeAddress: string, network: string) {
71
+ static async getPendingTransactions(
72
+ safeAddress: string,
73
+ network: string,
74
+ nonce: number
75
+ ) {
72
76
  const request = new RequestProvider(network, Safe.adapter);
73
- const nonce = (await request.getSafeInfo(toChecksumAddress(safeAddress)))
74
- .nonce;
75
77
  const transactions = await request.getPendingTransactions(
76
78
  safeAddress,
77
79
  nonce
@@ -80,6 +82,16 @@ class Safe {
80
82
  return transactions;
81
83
  }
82
84
 
85
+ async getPendingTransactions() {
86
+ const nonce = await this.getNonce();
87
+ const transactions = await this.request.getPendingTransactions(
88
+ this.safeAddress,
89
+ nonce
90
+ );
91
+
92
+ return transactions;
93
+ }
94
+
83
95
  static async getSafeVersion({
84
96
  address,
85
97
  provider,