@subwallet/extension-base 1.2.5-0 → 1.2.6-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/cjs/koni/api/nft/config.js +7 -4
- package/cjs/koni/background/handlers/Mobile.js +2 -1
- package/cjs/packageInfo.js +1 -1
- package/cjs/storage/index.js +1 -1
- package/koni/api/nft/config.js +7 -4
- package/koni/background/handlers/Mobile.js +2 -1
- package/package.json +5 -5
- package/packageInfo.js +1 -1
- package/storage/index.js +1 -1
|
@@ -133,10 +133,7 @@ exports.SUPPORTED_TRANSFER_SUBSTRATE_CHAIN_NAME = SUPPORTED_TRANSFER_SUBSTRATE_C
|
|
|
133
133
|
SUPPORTED_TRANSFER_SUBSTRATE_CHAIN_NAME["bitcountry"] = "bitcountry";
|
|
134
134
|
SUPPORTED_TRANSFER_SUBSTRATE_CHAIN_NAME["pioneer"] = "pioneer";
|
|
135
135
|
})(SUPPORTED_TRANSFER_SUBSTRATE_CHAIN_NAME || (exports.SUPPORTED_TRANSFER_SUBSTRATE_CHAIN_NAME = SUPPORTED_TRANSFER_SUBSTRATE_CHAIN_NAME = {}));
|
|
136
|
-
const RANDOM_IPFS_GATEWAY_SETTING = [
|
|
137
|
-
provider: CLOUDFLARE_PINATA_SERVER,
|
|
138
|
-
weight: 10
|
|
139
|
-
}];
|
|
136
|
+
const RANDOM_IPFS_GATEWAY_SETTING = [];
|
|
140
137
|
if (_utils.isFirefox) {
|
|
141
138
|
RANDOM_IPFS_GATEWAY_SETTING.push({
|
|
142
139
|
provider: SUBWALLET_IPFS,
|
|
@@ -179,6 +176,12 @@ if (_utils.RuntimeInfo.protocol && _utils.RuntimeInfo.protocol.startsWith('http'
|
|
|
179
176
|
weight: 5
|
|
180
177
|
});
|
|
181
178
|
}
|
|
179
|
+
if (RANDOM_IPFS_GATEWAY_SETTING.length === 0) {
|
|
180
|
+
RANDOM_IPFS_GATEWAY_SETTING.push({
|
|
181
|
+
provider: SUBWALLET_IPFS,
|
|
182
|
+
weight: 10
|
|
183
|
+
});
|
|
184
|
+
}
|
|
182
185
|
const RANDOM_IPFS_GATEWAY_TOTAL_WEIGHT = RANDOM_IPFS_GATEWAY_SETTING.reduce((value, item) => value + item.weight, 0);
|
|
183
186
|
function getRandomIpfsGateway() {
|
|
184
187
|
const weighedItems = [];
|
|
@@ -144,7 +144,8 @@ class Mobile {
|
|
|
144
144
|
}
|
|
145
145
|
async _getLocalStorageExportData() {
|
|
146
146
|
await swStorage.waitReady;
|
|
147
|
-
|
|
147
|
+
const storage = await swStorage.copy();
|
|
148
|
+
return Promise.resolve(JSON.stringify(storage));
|
|
148
149
|
}
|
|
149
150
|
async _getDexieExportData() {
|
|
150
151
|
const indexedDB = await this.state.dbService.exportDB();
|
package/cjs/packageInfo.js
CHANGED
package/cjs/storage/index.js
CHANGED
|
@@ -133,7 +133,7 @@ class SWStorage {
|
|
|
133
133
|
}
|
|
134
134
|
async copy() {
|
|
135
135
|
!this.isReady && (await this.waitReady);
|
|
136
|
-
return JSON.parse(JSON.stringify(this._storage));
|
|
136
|
+
return Promise.resolve(JSON.parse(JSON.stringify(this._storage)));
|
|
137
137
|
}
|
|
138
138
|
async sync() {
|
|
139
139
|
if (this.localStorage) {
|
package/koni/api/nft/config.js
CHANGED
|
@@ -96,10 +96,7 @@ export let SUPPORTED_TRANSFER_SUBSTRATE_CHAIN_NAME;
|
|
|
96
96
|
SUPPORTED_TRANSFER_SUBSTRATE_CHAIN_NAME["bitcountry"] = "bitcountry";
|
|
97
97
|
SUPPORTED_TRANSFER_SUBSTRATE_CHAIN_NAME["pioneer"] = "pioneer";
|
|
98
98
|
})(SUPPORTED_TRANSFER_SUBSTRATE_CHAIN_NAME || (SUPPORTED_TRANSFER_SUBSTRATE_CHAIN_NAME = {}));
|
|
99
|
-
const RANDOM_IPFS_GATEWAY_SETTING = [
|
|
100
|
-
provider: CLOUDFLARE_PINATA_SERVER,
|
|
101
|
-
weight: 10
|
|
102
|
-
}];
|
|
99
|
+
const RANDOM_IPFS_GATEWAY_SETTING = [];
|
|
103
100
|
if (isFirefox) {
|
|
104
101
|
RANDOM_IPFS_GATEWAY_SETTING.push({
|
|
105
102
|
provider: SUBWALLET_IPFS,
|
|
@@ -142,6 +139,12 @@ if (RuntimeInfo.protocol && RuntimeInfo.protocol.startsWith('http')) {
|
|
|
142
139
|
weight: 5
|
|
143
140
|
});
|
|
144
141
|
}
|
|
142
|
+
if (RANDOM_IPFS_GATEWAY_SETTING.length === 0) {
|
|
143
|
+
RANDOM_IPFS_GATEWAY_SETTING.push({
|
|
144
|
+
provider: SUBWALLET_IPFS,
|
|
145
|
+
weight: 10
|
|
146
|
+
});
|
|
147
|
+
}
|
|
145
148
|
const RANDOM_IPFS_GATEWAY_TOTAL_WEIGHT = RANDOM_IPFS_GATEWAY_SETTING.reduce((value, item) => value + item.weight, 0);
|
|
146
149
|
export function getRandomIpfsGateway() {
|
|
147
150
|
const weighedItems = [];
|
|
@@ -131,7 +131,8 @@ export default class Mobile {
|
|
|
131
131
|
}
|
|
132
132
|
async _getLocalStorageExportData() {
|
|
133
133
|
await swStorage.waitReady;
|
|
134
|
-
|
|
134
|
+
const storage = await swStorage.copy();
|
|
135
|
+
return Promise.resolve(JSON.stringify(storage));
|
|
135
136
|
}
|
|
136
137
|
async _getDexieExportData() {
|
|
137
138
|
const indexedDB = await this.state.dbService.exportDB();
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"./cjs/detectPackage.js"
|
|
18
18
|
],
|
|
19
19
|
"type": "module",
|
|
20
|
-
"version": "1.2.
|
|
20
|
+
"version": "1.2.6-1",
|
|
21
21
|
"main": "./cjs/index.js",
|
|
22
22
|
"module": "./index.js",
|
|
23
23
|
"types": "./index.d.ts",
|
|
@@ -1922,10 +1922,10 @@
|
|
|
1922
1922
|
"@sora-substrate/type-definitions": "^1.17.7",
|
|
1923
1923
|
"@substrate/connect": "^0.8.9",
|
|
1924
1924
|
"@subwallet/chain-list": "0.2.67",
|
|
1925
|
-
"@subwallet/extension-base": "^1.2.
|
|
1926
|
-
"@subwallet/extension-chains": "^1.2.
|
|
1927
|
-
"@subwallet/extension-dapp": "^1.2.
|
|
1928
|
-
"@subwallet/extension-inject": "^1.2.
|
|
1925
|
+
"@subwallet/extension-base": "^1.2.6-1",
|
|
1926
|
+
"@subwallet/extension-chains": "^1.2.6-1",
|
|
1927
|
+
"@subwallet/extension-dapp": "^1.2.6-1",
|
|
1928
|
+
"@subwallet/extension-inject": "^1.2.6-1",
|
|
1929
1929
|
"@subwallet/keyring": "^0.1.5",
|
|
1930
1930
|
"@subwallet/ui-keyring": "^0.1.5",
|
|
1931
1931
|
"@walletconnect/keyvaluestorage": "^1.1.1",
|
package/packageInfo.js
CHANGED
|
@@ -7,5 +7,5 @@ export const packageInfo = {
|
|
|
7
7
|
name: '@subwallet/extension-base',
|
|
8
8
|
path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
|
|
9
9
|
type: 'esm',
|
|
10
|
-
version: '1.2.
|
|
10
|
+
version: '1.2.6-1'
|
|
11
11
|
};
|
package/storage/index.js
CHANGED
|
@@ -122,7 +122,7 @@ export class SWStorage {
|
|
|
122
122
|
}
|
|
123
123
|
async copy() {
|
|
124
124
|
!this.isReady && (await this.waitReady);
|
|
125
|
-
return JSON.parse(JSON.stringify(this._storage));
|
|
125
|
+
return Promise.resolve(JSON.parse(JSON.stringify(this._storage)));
|
|
126
126
|
}
|
|
127
127
|
async sync() {
|
|
128
128
|
if (this.localStorage) {
|