@tonconnect/sdk
Advanced tools
Comparing version 0.0.38 to 0.0.39
@@ -69,3 +69,4 @@ import { TonConnectError } from "./errors/ton-connect.error"; | ||
private checkConnection; | ||
private checkFeatureSupport; | ||
private createConnectRequest; | ||
} |
@@ -30,2 +30,3 @@ "use strict"; | ||
const wallet_not_connected_error_1 = require("./errors/wallet/wallet-not-connected.error"); | ||
const wallet_not_support_feature_error_1 = require("./errors/wallet/wallet-not-support-feature.error"); | ||
const wallet_connection_source_1 = require("./models/wallet/wallet-connection-source"); | ||
@@ -148,4 +149,5 @@ const connect_errors_parser_1 = require("./parsers/connect-errors-parser"); | ||
return __awaiter(this, void 0, void 0, function* () { | ||
this.checkConnection(); | ||
this.checkFeatureSupport('SendTransaction'); | ||
const { validUntil } = transaction, tx = __rest(transaction, ["validUntil"]); | ||
this.checkConnection(); | ||
const response = yield this.provider.sendRequest(send_transaction_parser_1.sendTransactionParser.convertToRpcRequest(Object.assign(Object.assign({}, tx), { valid_until: validUntil }))); | ||
@@ -231,2 +233,8 @@ if (send_transaction_parser_1.sendTransactionParser.isError(response)) { | ||
} | ||
checkFeatureSupport(feature) { | ||
var _a; | ||
if (!((_a = this.wallet) === null || _a === void 0 ? void 0 : _a.device.features.includes(feature))) { | ||
throw new wallet_not_support_feature_error_1.WalletNotSupportFeatureError(); | ||
} | ||
} | ||
createConnectRequest(request) { | ||
@@ -233,0 +241,0 @@ const items = [ |
{ | ||
"name": "@tonconnect/sdk", | ||
"version": "0.0.38", | ||
"version": "0.0.39", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "build": "npx rimraf lib && ttsc && npx rimraf dist && webpack --mode development", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
424369
126
2456