stackswap-front-api-test-02 1.1.101 → 1.1.102
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/506.index.umd.js +1 -1
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +26 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.LICENSE.txt +9 -0
- package/package.json +6 -5
- package/src/index.ts +28 -0
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* The buffer module from node.js, for the browser.
|
|
3
|
+
*
|
|
4
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
9
|
+
|
|
1
10
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
2
11
|
|
|
3
12
|
/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stackswap-front-api-test-02",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.102",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "tsc -b tsconfig.build.json --watch --verbose",
|
|
@@ -18,18 +18,19 @@
|
|
|
18
18
|
"author": "",
|
|
19
19
|
"license": "ISC",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@stacks/connect": "^7.
|
|
22
|
-
"@stacks/transactions": "^6.
|
|
23
|
-
"axios": "
|
|
21
|
+
"@stacks/connect": "^7.7.1",
|
|
22
|
+
"@stacks/transactions": "^6.15.0",
|
|
23
|
+
"axios": "1.6.0",
|
|
24
24
|
"bignumber.js": "^9.0.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/lodash.clonedeep": "^4.5.7",
|
|
28
|
+
"buffer": "^6.0.3",
|
|
28
29
|
"regenerator-runtime": "^0.13.9",
|
|
29
30
|
"rimraf": "^3.0.2",
|
|
30
31
|
"ts-loader": "^9.1.1",
|
|
31
32
|
"typescript": "^4.2.4",
|
|
32
|
-
"webpack": "
|
|
33
|
+
"webpack": "5.76.0",
|
|
33
34
|
"webpack-cli": "^4.6.0"
|
|
34
35
|
},
|
|
35
36
|
"files": [
|
package/src/index.ts
CHANGED
|
@@ -160,6 +160,34 @@ export class StackswapMainnetAPI implements StackswapAPI{
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
|
|
164
|
+
walletConnect2(userSession: UserSession, callback: (err: any, result: any) => void): void {
|
|
165
|
+
try {
|
|
166
|
+
showConnect({
|
|
167
|
+
appDetails: {
|
|
168
|
+
name: 'Stackswap',
|
|
169
|
+
icon: 'https://app.stackswap.org/favicon.ico',
|
|
170
|
+
},
|
|
171
|
+
redirectTo: '/',
|
|
172
|
+
onFinish: () => {
|
|
173
|
+
const profile = userSession.loadUserData().profile.stxAddress;
|
|
174
|
+
if (this.config.isMainnet()){
|
|
175
|
+
this.senderAdderss = profile.mainnet;
|
|
176
|
+
} else {
|
|
177
|
+
this.senderAdderss = profile.testnet;
|
|
178
|
+
}
|
|
179
|
+
this.connected = true;
|
|
180
|
+
|
|
181
|
+
callback(null, this.senderAdderss);
|
|
182
|
+
},
|
|
183
|
+
userSession
|
|
184
|
+
});
|
|
185
|
+
} catch (e) {
|
|
186
|
+
callback(e, null);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
|
|
163
191
|
getConnectedWallet(callback: (err: any, result: any) => void): void {
|
|
164
192
|
try {
|
|
165
193
|
const appConfig = new AppConfig(['store_write', 'publish_data']);
|