@dynamic-labs/ton 4.77.1 → 4.77.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.77.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.77.2...v4.77.3) (2026-04-18)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* **ton:** convert sendBalance amount to smallest units ([#10941](https://github.com/dynamic-labs/dynamic-auth/issues/10941)) ([5eac6be](https://github.com/dynamic-labs/dynamic-auth/commit/5eac6be1c3444525893e6e5e95ce65f6c9f9dea3))
|
|
8
|
+
|
|
9
|
+
### [4.77.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.77.1...v4.77.2) (2026-04-16)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* add support for next 16 and dual-module-import breaking. ([#10926](https://github.com/dynamic-labs/dynamic-auth/issues/10926)) ([312c7b8](https://github.com/dynamic-labs/dynamic-auth/commit/312c7b83f7a39109c9a9950a6d45ea9a815dd800))
|
|
15
|
+
* **DYNT-399:** phantom btc missing public address ([#10914](https://github.com/dynamic-labs/dynamic-auth/issues/10914)) ([632ead1](https://github.com/dynamic-labs/dynamic-auth/commit/632ead1e3b500ff2e78915459d6764e4c4a49168))
|
|
16
|
+
* **playwright:** fix tests flakiness [DYNT-555] ([#10923](https://github.com/dynamic-labs/dynamic-auth/issues/10923)) ([6556884](https://github.com/dynamic-labs/dynamic-auth/commit/65568849580bb8549eb11a1c44fd22fbc56f624c))
|
|
17
|
+
* **playwright:** stabilize flaky tests (domain-access-control + embedded-wallet) DYNT-495 ([#10881](https://github.com/dynamic-labs/dynamic-auth/issues/10881)) ([4925e19](https://github.com/dynamic-labs/dynamic-auth/commit/4925e1903b5f6a37a550cb34ab900abff1cc9f23))
|
|
18
|
+
* remediate high-severity dependency vulnerabilities ([#10919](https://github.com/dynamic-labs/dynamic-auth/issues/10919)) ([7d7cfdd](https://github.com/dynamic-labs/dynamic-auth/commit/7d7cfdd162d9f7a3c8c2501d47b33ae8f4e4d26d))
|
|
19
|
+
* remediate high-severity dependency vulnerabilities ([#10925](https://github.com/dynamic-labs/dynamic-auth/issues/10925)) ([4039d25](https://github.com/dynamic-labs/dynamic-auth/commit/4039d25afea78c49999443caba65d42d4fc96c95))
|
|
20
|
+
* upgrade axios to 1.15.0 to fix CVE-2026-40175 ([#10918](https://github.com/dynamic-labs/dynamic-auth/issues/10918)) ([74751dc](https://github.com/dynamic-labs/dynamic-auth/commit/74751dcf4e7a918e39de2fb667ee6ead4a7a4602))
|
|
21
|
+
* **waas:** skip password prompt when wallet is not password-encrypted ([#10916](https://github.com/dynamic-labs/dynamic-auth/issues/10916)) ([e3dd403](https://github.com/dynamic-labs/dynamic-auth/commit/e3dd4035c447106d40baa5e7e12fa35fafa0808f))
|
|
22
|
+
* **walletconnect:** improve error logging and handle empty network configs ([#10897](https://github.com/dynamic-labs/dynamic-auth/issues/10897)) ([bea7a9f](https://github.com/dynamic-labs/dynamic-auth/commit/bea7a9fd4628e4fbca554f8eed4a0dc097fab83b))
|
|
23
|
+
|
|
2
24
|
### [4.77.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.77.0...v4.77.1) (2026-04-10)
|
|
3
25
|
|
|
4
26
|
### Bug Fixes
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/ton",
|
|
3
|
-
"version": "4.77.
|
|
3
|
+
"version": "4.77.3",
|
|
4
4
|
"description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@dynamic-labs-sdk/client": "0.24.0",
|
|
22
|
-
"@dynamic-labs/assert-package-version": "4.77.
|
|
23
|
-
"@dynamic-labs/logger": "4.77.
|
|
22
|
+
"@dynamic-labs/assert-package-version": "4.77.3",
|
|
23
|
+
"@dynamic-labs/logger": "4.77.3",
|
|
24
24
|
"@dynamic-labs/sdk-api-core": "0.0.927",
|
|
25
|
-
"@dynamic-labs/types": "4.77.
|
|
26
|
-
"@dynamic-labs/utils": "4.77.
|
|
27
|
-
"@dynamic-labs/waas": "4.77.
|
|
28
|
-
"@dynamic-labs/wallet-book": "4.77.
|
|
29
|
-
"@dynamic-labs/wallet-connector-core": "4.77.
|
|
25
|
+
"@dynamic-labs/types": "4.77.3",
|
|
26
|
+
"@dynamic-labs/utils": "4.77.3",
|
|
27
|
+
"@dynamic-labs/waas": "4.77.3",
|
|
28
|
+
"@dynamic-labs/wallet-book": "4.77.3",
|
|
29
|
+
"@dynamic-labs/wallet-connector-core": "4.77.3",
|
|
30
30
|
"@ton/core": "0.62.0",
|
|
31
31
|
"@ton/crypto": "3.3.0",
|
|
32
32
|
"@ton/ton": "16.0.0",
|
|
@@ -22,6 +22,7 @@ const DEFAULT_FORWARD_TON_AMOUNT = BigInt(1);
|
|
|
22
22
|
class TonWallet extends walletConnectorCore.Wallet {
|
|
23
23
|
constructor(props) {
|
|
24
24
|
super(props);
|
|
25
|
+
this.toSmallestUnit = (amount, decimals) => BigInt(Math.floor(parseFloat(amount) * Math.pow(10, decimals)));
|
|
25
26
|
}
|
|
26
27
|
/**
|
|
27
28
|
* Send TON (native currency) to an address
|
|
@@ -34,9 +35,8 @@ class TonWallet extends walletConnectorCore.Wallet {
|
|
|
34
35
|
sendTon(to, amount, comment) {
|
|
35
36
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
36
37
|
const amountStr = typeof amount === 'number' ? amount.toString() : amount;
|
|
37
|
-
const amountNano = BigInt(Math.floor(parseFloat(amountStr) * 1000000000));
|
|
38
38
|
const hash = yield this.sendBalance({
|
|
39
|
-
amount:
|
|
39
|
+
amount: amountStr,
|
|
40
40
|
comment,
|
|
41
41
|
toAddress: to,
|
|
42
42
|
});
|
|
@@ -55,18 +55,20 @@ class TonWallet extends walletConnectorCore.Wallet {
|
|
|
55
55
|
*/
|
|
56
56
|
sendBalance(_a) {
|
|
57
57
|
return _tslib.__awaiter(this, arguments, void 0, function* ({ amount, comment, toAddress, token, }) {
|
|
58
|
+
var _b;
|
|
59
|
+
yield this._connector.validateActiveWallet(this.address);
|
|
58
60
|
if (token === null || token === void 0 ? void 0 : token.address) {
|
|
59
61
|
return this.sendJettonViaConnector({
|
|
60
62
|
forwardPayload: comment,
|
|
61
63
|
forwardTonAmount: DEFAULT_FORWARD_TON_AMOUNT,
|
|
62
|
-
jettonAmount:
|
|
64
|
+
jettonAmount: this.toSmallestUnit(amount, (_b = token.decimals) !== null && _b !== void 0 ? _b : 0),
|
|
63
65
|
jettonMasterAddress: token.address,
|
|
64
66
|
recipientAddress: toAddress,
|
|
65
67
|
});
|
|
66
68
|
}
|
|
67
69
|
const result = yield this._connector.sendTransaction({
|
|
68
70
|
messages: [
|
|
69
|
-
Object.assign({ address: toAddress, amount: amount }, (comment
|
|
71
|
+
Object.assign({ address: toAddress, amount: this.toSmallestUnit(amount, 9).toString() }, (comment
|
|
70
72
|
? { payload: this._connector.encodeComment(comment) }
|
|
71
73
|
: {})),
|
|
72
74
|
],
|
|
@@ -18,6 +18,7 @@ const DEFAULT_FORWARD_TON_AMOUNT = BigInt(1);
|
|
|
18
18
|
class TonWallet extends Wallet {
|
|
19
19
|
constructor(props) {
|
|
20
20
|
super(props);
|
|
21
|
+
this.toSmallestUnit = (amount, decimals) => BigInt(Math.floor(parseFloat(amount) * Math.pow(10, decimals)));
|
|
21
22
|
}
|
|
22
23
|
/**
|
|
23
24
|
* Send TON (native currency) to an address
|
|
@@ -30,9 +31,8 @@ class TonWallet extends Wallet {
|
|
|
30
31
|
sendTon(to, amount, comment) {
|
|
31
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
33
|
const amountStr = typeof amount === 'number' ? amount.toString() : amount;
|
|
33
|
-
const amountNano = BigInt(Math.floor(parseFloat(amountStr) * 1000000000));
|
|
34
34
|
const hash = yield this.sendBalance({
|
|
35
|
-
amount:
|
|
35
|
+
amount: amountStr,
|
|
36
36
|
comment,
|
|
37
37
|
toAddress: to,
|
|
38
38
|
});
|
|
@@ -51,18 +51,20 @@ class TonWallet extends Wallet {
|
|
|
51
51
|
*/
|
|
52
52
|
sendBalance(_a) {
|
|
53
53
|
return __awaiter(this, arguments, void 0, function* ({ amount, comment, toAddress, token, }) {
|
|
54
|
+
var _b;
|
|
55
|
+
yield this._connector.validateActiveWallet(this.address);
|
|
54
56
|
if (token === null || token === void 0 ? void 0 : token.address) {
|
|
55
57
|
return this.sendJettonViaConnector({
|
|
56
58
|
forwardPayload: comment,
|
|
57
59
|
forwardTonAmount: DEFAULT_FORWARD_TON_AMOUNT,
|
|
58
|
-
jettonAmount:
|
|
60
|
+
jettonAmount: this.toSmallestUnit(amount, (_b = token.decimals) !== null && _b !== void 0 ? _b : 0),
|
|
59
61
|
jettonMasterAddress: token.address,
|
|
60
62
|
recipientAddress: toAddress,
|
|
61
63
|
});
|
|
62
64
|
}
|
|
63
65
|
const result = yield this._connector.sendTransaction({
|
|
64
66
|
messages: [
|
|
65
|
-
Object.assign({ address: toAddress, amount: amount }, (comment
|
|
67
|
+
Object.assign({ address: toAddress, amount: this.toSmallestUnit(amount, 9).toString() }, (comment
|
|
66
68
|
? { payload: this._connector.encodeComment(comment) }
|
|
67
69
|
: {})),
|
|
68
70
|
],
|