@toruslabs/ethereum-controllers 9.4.1 → 9.4.3
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.
|
@@ -85,26 +85,29 @@ class PreferencesController extends baseControllers.BasePreferencesController {
|
|
|
85
85
|
}
|
|
86
86
|
async getEtherScanTokens(address, chainId, skipCache) {
|
|
87
87
|
const selectedAddress = address;
|
|
88
|
-
let path = `v2/tokens?chainId=${chainId}
|
|
88
|
+
let path = `v2/tokens?chainId=${chainId}`;
|
|
89
89
|
if (skipCache) {
|
|
90
90
|
path += `&skipCache=true`;
|
|
91
91
|
}
|
|
92
|
-
// TODO: pass selected address as headers and not as a query parameter
|
|
93
92
|
const result = await this.getAuthHttpClient().get(`${this.config.api}/${path}`, {
|
|
94
|
-
authenticated: true
|
|
93
|
+
authenticated: true,
|
|
94
|
+
headers: this.constructAuthHeaders({
|
|
95
|
+
address: selectedAddress
|
|
96
|
+
})
|
|
95
97
|
});
|
|
96
98
|
return result.data;
|
|
97
99
|
}
|
|
98
100
|
async getSimpleHashNfts(address, chainId, skipCache) {
|
|
99
101
|
const selectedAddress = address;
|
|
100
|
-
let path = `v2/nfts?chainId=${chainId}
|
|
102
|
+
let path = `v2/nfts?chainId=${chainId}`;
|
|
101
103
|
if (skipCache) {
|
|
102
104
|
path += `&skipCache=true`;
|
|
103
105
|
}
|
|
104
|
-
// TODO: pass selected address as headers and not as a query parameter
|
|
105
106
|
const result = await this.getAuthHttpClient().get(`${this.config.api}/${path}`, {
|
|
106
107
|
authenticated: true,
|
|
107
|
-
headers: this.constructAuthHeaders(
|
|
108
|
+
headers: this.constructAuthHeaders({
|
|
109
|
+
address: selectedAddress
|
|
110
|
+
})
|
|
108
111
|
});
|
|
109
112
|
return result.data;
|
|
110
113
|
}
|
|
@@ -83,26 +83,29 @@ class PreferencesController extends BasePreferencesController {
|
|
|
83
83
|
}
|
|
84
84
|
async getEtherScanTokens(address, chainId, skipCache) {
|
|
85
85
|
const selectedAddress = address;
|
|
86
|
-
let path = `v2/tokens?chainId=${chainId}
|
|
86
|
+
let path = `v2/tokens?chainId=${chainId}`;
|
|
87
87
|
if (skipCache) {
|
|
88
88
|
path += `&skipCache=true`;
|
|
89
89
|
}
|
|
90
|
-
// TODO: pass selected address as headers and not as a query parameter
|
|
91
90
|
const result = await this.getAuthHttpClient().get(`${this.config.api}/${path}`, {
|
|
92
|
-
authenticated: true
|
|
91
|
+
authenticated: true,
|
|
92
|
+
headers: this.constructAuthHeaders({
|
|
93
|
+
address: selectedAddress
|
|
94
|
+
})
|
|
93
95
|
});
|
|
94
96
|
return result.data;
|
|
95
97
|
}
|
|
96
98
|
async getSimpleHashNfts(address, chainId, skipCache) {
|
|
97
99
|
const selectedAddress = address;
|
|
98
|
-
let path = `v2/nfts?chainId=${chainId}
|
|
100
|
+
let path = `v2/nfts?chainId=${chainId}`;
|
|
99
101
|
if (skipCache) {
|
|
100
102
|
path += `&skipCache=true`;
|
|
101
103
|
}
|
|
102
|
-
// TODO: pass selected address as headers and not as a query parameter
|
|
103
104
|
const result = await this.getAuthHttpClient().get(`${this.config.api}/${path}`, {
|
|
104
105
|
authenticated: true,
|
|
105
|
-
headers: this.constructAuthHeaders(
|
|
106
|
+
headers: this.constructAuthHeaders({
|
|
107
|
+
address: selectedAddress
|
|
108
|
+
})
|
|
106
109
|
});
|
|
107
110
|
return result.data;
|
|
108
111
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toruslabs/ethereum-controllers",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.3",
|
|
4
4
|
"homepage": "https://github.com/torusresearch/controllers#readme",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@metamask/smart-accounts-kit": "~0.4.0-beta.2",
|
|
24
|
-
"@toruslabs/base-controllers": "^9.4.
|
|
24
|
+
"@toruslabs/base-controllers": "^9.4.3",
|
|
25
25
|
"@toruslabs/http-helpers": "^9.0.0",
|
|
26
26
|
"@toruslabs/metadata-helpers": "^8.2.0",
|
|
27
27
|
"@web3auth/auth": "^11.4.2",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "6d4a4b5252f282f905b82a9f3eed9db6d85d97f4",
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@types/uuid": "^11.0.0",
|
|
70
70
|
"typechain": "^8.3.2"
|