@portal-hq/injected-provider
Advanced tools
Comparing version 3.0.6 to 4.0.0
@@ -16,2 +16,3 @@ "use strict"; | ||
exports.injectionScript = void 0; | ||
const core_1 = require("@portal-hq/core"); | ||
const utils_1 = require("@portal-hq/utils"); | ||
@@ -277,3 +278,9 @@ const signers_1 = require("./signers"); | ||
case 'wallet_switchEthereumChain': | ||
return yield ((_a = this.signer) === null || _a === void 0 ? void 0 : _a.sign({ method, params }, this)); | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return | ||
return yield ((_a = this.signer) === null || _a === void 0 ? void 0 : _a.sign({ | ||
method, | ||
params, | ||
chainId: `eip155:${this.chainId}`, | ||
curve: core_1.PortalCurve.SECP256K1, | ||
}, this)); | ||
default: | ||
@@ -280,0 +287,0 @@ throw new Error('[Portal] Method "' + method + '" not supported'); |
@@ -10,2 +10,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
}; | ||
import { PortalCurve } from '@portal-hq/core'; | ||
import { HttpRequester, InvalidApiKeyError, InvalidChainIdError, InvalidGatewayConfigError, NoAddressError, ProviderRpcError, RpcErrorCodes, } from '@portal-hq/utils'; | ||
@@ -270,3 +271,9 @@ import { PostMessageSigner } from './signers'; | ||
case 'wallet_switchEthereumChain': | ||
return yield ((_a = this.signer) === null || _a === void 0 ? void 0 : _a.sign({ method, params }, this)); | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return | ||
return yield ((_a = this.signer) === null || _a === void 0 ? void 0 : _a.sign({ | ||
method, | ||
params, | ||
chainId: `eip155:${this.chainId}`, | ||
curve: PortalCurve.SECP256K1, | ||
}, this)); | ||
default: | ||
@@ -273,0 +280,0 @@ throw new Error('[Portal] Method "' + method + '" not supported'); |
{ | ||
"name": "@portal-hq/injected-provider", | ||
"version": "3.0.6", | ||
"version": "4.0.0", | ||
"license": "MIT", | ||
@@ -23,3 +23,3 @@ "main": "lib/commonjs/index", | ||
"dependencies": { | ||
"@portal-hq/utils": "^3.0.6" | ||
"@portal-hq/utils": "^4.0.0" | ||
}, | ||
@@ -41,3 +41,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "884d505870ff81f79fde92abdcea508619eaf86e" | ||
"gitHead": "a1c6f51ff156d3d1922cdaa29ee43fe4cfefd932" | ||
} |
@@ -0,1 +1,2 @@ | ||
import { PortalCurve } from '@portal-hq/core' | ||
import { | ||
@@ -340,3 +341,12 @@ HttpRequester, | ||
case 'wallet_switchEthereumChain': | ||
return await this.signer?.sign({ method, params }, this) | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return | ||
return await this.signer?.sign( | ||
{ | ||
method, | ||
params, | ||
chainId: `eip155:${this.chainId}`, | ||
curve: PortalCurve.SECP256K1, | ||
}, | ||
this, | ||
) | ||
default: | ||
@@ -343,0 +353,0 @@ throw new Error('[Portal] Method "' + method + '" not supported') |
427579
3505
+ Added@portal-hq/utils@4.1.1(transitive)
- Removed@portal-hq/utils@3.0.6(transitive)
Updated@portal-hq/utils@^4.0.0