@injectivelabs/exceptions 1.15.18 → 1.15.19
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/cjs/exceptions/exceptions/RainbowWalletException.d.ts +7 -0
- package/dist/cjs/exceptions/exceptions/RainbowWalletException.js +23 -0
- package/dist/cjs/exceptions/exceptions/index.d.ts +11 -10
- package/dist/cjs/exceptions/exceptions/index.js +21 -19
- package/dist/esm/exceptions/exceptions/RainbowWalletException.d.ts +7 -0
- package/dist/esm/exceptions/exceptions/RainbowWalletException.js +19 -0
- package/dist/esm/exceptions/exceptions/index.d.ts +11 -10
- package/dist/esm/exceptions/exceptions/index.js +11 -10
- package/package.json +2 -2
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConcreteException } from '../base.js';
|
|
2
|
+
import { ErrorContext } from '../types/index.js';
|
|
3
|
+
export declare class RainbowWalletException extends ConcreteException {
|
|
4
|
+
static errorClass: string;
|
|
5
|
+
constructor(error: Error, context?: ErrorContext);
|
|
6
|
+
parse(): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RainbowWalletException = void 0;
|
|
4
|
+
const base_js_1 = require("../base.js");
|
|
5
|
+
const index_js_1 = require("../types/index.js");
|
|
6
|
+
const maps_js_1 = require("../utils/maps.js");
|
|
7
|
+
const removeMetamaskFromErrorString = (message) => message
|
|
8
|
+
.replaceAll('Rainbow', '')
|
|
9
|
+
.replaceAll('RainBow', '')
|
|
10
|
+
.replaceAll('Rainbow:', '');
|
|
11
|
+
class RainbowWalletException extends base_js_1.ConcreteException {
|
|
12
|
+
static errorClass = 'RainbowWalletException';
|
|
13
|
+
constructor(error, context) {
|
|
14
|
+
super(error, context);
|
|
15
|
+
this.type = index_js_1.ErrorType.WalletError;
|
|
16
|
+
}
|
|
17
|
+
parse() {
|
|
18
|
+
const { message } = this;
|
|
19
|
+
this.setMessage((0, maps_js_1.mapMetamaskMessage)(removeMetamaskFromErrorString(message)));
|
|
20
|
+
this.setName(RainbowWalletException.errorClass);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.RainbowWalletException = RainbowWalletException;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { GrpcUnaryRequestException } from './GrpcUnaryRequestException.js';
|
|
2
|
-
import { HttpRequestException } from './HttpRequestException.js';
|
|
3
1
|
import { Web3Exception } from './Web3Exception.js';
|
|
4
|
-
import { GeneralException } from './GeneralException.js';
|
|
5
2
|
import { LedgerException } from './LedgerException.js';
|
|
6
|
-
import { LedgerCosmosException } from './LedgerCosmosException.js';
|
|
7
|
-
import { MetamaskException } from './MetamaskException.js';
|
|
8
|
-
import { TrustWalletException } from './TrustWalletException.js';
|
|
9
|
-
import { OkxWalletException } from './OkxWalletException.js';
|
|
10
3
|
import { TrezorException } from './TrezorException.js';
|
|
11
|
-
import { CosmosWalletException } from './CosmosWalletException.js';
|
|
12
|
-
import { TransactionException } from './TransactionException.js';
|
|
13
4
|
import { WalletException } from './WalletException.js';
|
|
14
5
|
import { BitGetException } from './BitGetException.js';
|
|
6
|
+
import { GeneralException } from './GeneralException.js';
|
|
7
|
+
import { MetamaskException } from './MetamaskException.js';
|
|
8
|
+
import { OkxWalletException } from './OkxWalletException.js';
|
|
9
|
+
import { HttpRequestException } from './HttpRequestException.js';
|
|
10
|
+
import { TrustWalletException } from './TrustWalletException.js';
|
|
11
|
+
import { TransactionException } from './TransactionException.js';
|
|
12
|
+
import { LedgerCosmosException } from './LedgerCosmosException.js';
|
|
13
|
+
import { CosmosWalletException } from './CosmosWalletException.js';
|
|
14
|
+
import { RainbowWalletException } from './RainbowWalletException.js';
|
|
15
|
+
import { GrpcUnaryRequestException } from './GrpcUnaryRequestException.js';
|
|
15
16
|
import { TurnkeyWalletSessionException } from './TurnkeyWalletSessionException.js';
|
|
16
|
-
export { Web3Exception, LedgerException, TrezorException, WalletException,
|
|
17
|
+
export { Web3Exception, LedgerException, TrezorException, WalletException, BitGetException, GeneralException, MetamaskException, OkxWalletException, TransactionException, TrustWalletException, HttpRequestException, LedgerCosmosException, CosmosWalletException, RainbowWalletException, GrpcUnaryRequestException, TurnkeyWalletSessionException, };
|
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TurnkeyWalletSessionException = exports.GrpcUnaryRequestException = exports.CosmosWalletException = exports.LedgerCosmosException = exports.HttpRequestException = exports.
|
|
4
|
-
const GrpcUnaryRequestException_js_1 = require("./GrpcUnaryRequestException.js");
|
|
5
|
-
Object.defineProperty(exports, "GrpcUnaryRequestException", { enumerable: true, get: function () { return GrpcUnaryRequestException_js_1.GrpcUnaryRequestException; } });
|
|
6
|
-
const HttpRequestException_js_1 = require("./HttpRequestException.js");
|
|
7
|
-
Object.defineProperty(exports, "HttpRequestException", { enumerable: true, get: function () { return HttpRequestException_js_1.HttpRequestException; } });
|
|
3
|
+
exports.TurnkeyWalletSessionException = exports.GrpcUnaryRequestException = exports.RainbowWalletException = exports.CosmosWalletException = exports.LedgerCosmosException = exports.HttpRequestException = exports.TrustWalletException = exports.TransactionException = exports.OkxWalletException = exports.MetamaskException = exports.GeneralException = exports.BitGetException = exports.WalletException = exports.TrezorException = exports.LedgerException = exports.Web3Exception = void 0;
|
|
8
4
|
const Web3Exception_js_1 = require("./Web3Exception.js");
|
|
9
5
|
Object.defineProperty(exports, "Web3Exception", { enumerable: true, get: function () { return Web3Exception_js_1.Web3Exception; } });
|
|
10
|
-
const GeneralException_js_1 = require("./GeneralException.js");
|
|
11
|
-
Object.defineProperty(exports, "GeneralException", { enumerable: true, get: function () { return GeneralException_js_1.GeneralException; } });
|
|
12
6
|
const LedgerException_js_1 = require("./LedgerException.js");
|
|
13
7
|
Object.defineProperty(exports, "LedgerException", { enumerable: true, get: function () { return LedgerException_js_1.LedgerException; } });
|
|
14
|
-
const LedgerCosmosException_js_1 = require("./LedgerCosmosException.js");
|
|
15
|
-
Object.defineProperty(exports, "LedgerCosmosException", { enumerable: true, get: function () { return LedgerCosmosException_js_1.LedgerCosmosException; } });
|
|
16
|
-
const MetamaskException_js_1 = require("./MetamaskException.js");
|
|
17
|
-
Object.defineProperty(exports, "MetamaskException", { enumerable: true, get: function () { return MetamaskException_js_1.MetamaskException; } });
|
|
18
|
-
const TrustWalletException_js_1 = require("./TrustWalletException.js");
|
|
19
|
-
Object.defineProperty(exports, "TrustWalletException", { enumerable: true, get: function () { return TrustWalletException_js_1.TrustWalletException; } });
|
|
20
|
-
const OkxWalletException_js_1 = require("./OkxWalletException.js");
|
|
21
|
-
Object.defineProperty(exports, "OkxWalletException", { enumerable: true, get: function () { return OkxWalletException_js_1.OkxWalletException; } });
|
|
22
8
|
const TrezorException_js_1 = require("./TrezorException.js");
|
|
23
9
|
Object.defineProperty(exports, "TrezorException", { enumerable: true, get: function () { return TrezorException_js_1.TrezorException; } });
|
|
24
|
-
const CosmosWalletException_js_1 = require("./CosmosWalletException.js");
|
|
25
|
-
Object.defineProperty(exports, "CosmosWalletException", { enumerable: true, get: function () { return CosmosWalletException_js_1.CosmosWalletException; } });
|
|
26
|
-
const TransactionException_js_1 = require("./TransactionException.js");
|
|
27
|
-
Object.defineProperty(exports, "TransactionException", { enumerable: true, get: function () { return TransactionException_js_1.TransactionException; } });
|
|
28
10
|
const WalletException_js_1 = require("./WalletException.js");
|
|
29
11
|
Object.defineProperty(exports, "WalletException", { enumerable: true, get: function () { return WalletException_js_1.WalletException; } });
|
|
30
12
|
const BitGetException_js_1 = require("./BitGetException.js");
|
|
31
13
|
Object.defineProperty(exports, "BitGetException", { enumerable: true, get: function () { return BitGetException_js_1.BitGetException; } });
|
|
14
|
+
const GeneralException_js_1 = require("./GeneralException.js");
|
|
15
|
+
Object.defineProperty(exports, "GeneralException", { enumerable: true, get: function () { return GeneralException_js_1.GeneralException; } });
|
|
16
|
+
const MetamaskException_js_1 = require("./MetamaskException.js");
|
|
17
|
+
Object.defineProperty(exports, "MetamaskException", { enumerable: true, get: function () { return MetamaskException_js_1.MetamaskException; } });
|
|
18
|
+
const OkxWalletException_js_1 = require("./OkxWalletException.js");
|
|
19
|
+
Object.defineProperty(exports, "OkxWalletException", { enumerable: true, get: function () { return OkxWalletException_js_1.OkxWalletException; } });
|
|
20
|
+
const HttpRequestException_js_1 = require("./HttpRequestException.js");
|
|
21
|
+
Object.defineProperty(exports, "HttpRequestException", { enumerable: true, get: function () { return HttpRequestException_js_1.HttpRequestException; } });
|
|
22
|
+
const TrustWalletException_js_1 = require("./TrustWalletException.js");
|
|
23
|
+
Object.defineProperty(exports, "TrustWalletException", { enumerable: true, get: function () { return TrustWalletException_js_1.TrustWalletException; } });
|
|
24
|
+
const TransactionException_js_1 = require("./TransactionException.js");
|
|
25
|
+
Object.defineProperty(exports, "TransactionException", { enumerable: true, get: function () { return TransactionException_js_1.TransactionException; } });
|
|
26
|
+
const LedgerCosmosException_js_1 = require("./LedgerCosmosException.js");
|
|
27
|
+
Object.defineProperty(exports, "LedgerCosmosException", { enumerable: true, get: function () { return LedgerCosmosException_js_1.LedgerCosmosException; } });
|
|
28
|
+
const CosmosWalletException_js_1 = require("./CosmosWalletException.js");
|
|
29
|
+
Object.defineProperty(exports, "CosmosWalletException", { enumerable: true, get: function () { return CosmosWalletException_js_1.CosmosWalletException; } });
|
|
30
|
+
const RainbowWalletException_js_1 = require("./RainbowWalletException.js");
|
|
31
|
+
Object.defineProperty(exports, "RainbowWalletException", { enumerable: true, get: function () { return RainbowWalletException_js_1.RainbowWalletException; } });
|
|
32
|
+
const GrpcUnaryRequestException_js_1 = require("./GrpcUnaryRequestException.js");
|
|
33
|
+
Object.defineProperty(exports, "GrpcUnaryRequestException", { enumerable: true, get: function () { return GrpcUnaryRequestException_js_1.GrpcUnaryRequestException; } });
|
|
32
34
|
const TurnkeyWalletSessionException_js_1 = require("./TurnkeyWalletSessionException.js");
|
|
33
35
|
Object.defineProperty(exports, "TurnkeyWalletSessionException", { enumerable: true, get: function () { return TurnkeyWalletSessionException_js_1.TurnkeyWalletSessionException; } });
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConcreteException } from '../base.js';
|
|
2
|
+
import { ErrorContext } from '../types/index.js';
|
|
3
|
+
export declare class RainbowWalletException extends ConcreteException {
|
|
4
|
+
static errorClass: string;
|
|
5
|
+
constructor(error: Error, context?: ErrorContext);
|
|
6
|
+
parse(): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ConcreteException } from '../base.js';
|
|
2
|
+
import { ErrorType } from '../types/index.js';
|
|
3
|
+
import { mapMetamaskMessage } from '../utils/maps.js';
|
|
4
|
+
const removeMetamaskFromErrorString = (message) => message
|
|
5
|
+
.replaceAll('Rainbow', '')
|
|
6
|
+
.replaceAll('RainBow', '')
|
|
7
|
+
.replaceAll('Rainbow:', '');
|
|
8
|
+
export class RainbowWalletException extends ConcreteException {
|
|
9
|
+
static errorClass = 'RainbowWalletException';
|
|
10
|
+
constructor(error, context) {
|
|
11
|
+
super(error, context);
|
|
12
|
+
this.type = ErrorType.WalletError;
|
|
13
|
+
}
|
|
14
|
+
parse() {
|
|
15
|
+
const { message } = this;
|
|
16
|
+
this.setMessage(mapMetamaskMessage(removeMetamaskFromErrorString(message)));
|
|
17
|
+
this.setName(RainbowWalletException.errorClass);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { GrpcUnaryRequestException } from './GrpcUnaryRequestException.js';
|
|
2
|
-
import { HttpRequestException } from './HttpRequestException.js';
|
|
3
1
|
import { Web3Exception } from './Web3Exception.js';
|
|
4
|
-
import { GeneralException } from './GeneralException.js';
|
|
5
2
|
import { LedgerException } from './LedgerException.js';
|
|
6
|
-
import { LedgerCosmosException } from './LedgerCosmosException.js';
|
|
7
|
-
import { MetamaskException } from './MetamaskException.js';
|
|
8
|
-
import { TrustWalletException } from './TrustWalletException.js';
|
|
9
|
-
import { OkxWalletException } from './OkxWalletException.js';
|
|
10
3
|
import { TrezorException } from './TrezorException.js';
|
|
11
|
-
import { CosmosWalletException } from './CosmosWalletException.js';
|
|
12
|
-
import { TransactionException } from './TransactionException.js';
|
|
13
4
|
import { WalletException } from './WalletException.js';
|
|
14
5
|
import { BitGetException } from './BitGetException.js';
|
|
6
|
+
import { GeneralException } from './GeneralException.js';
|
|
7
|
+
import { MetamaskException } from './MetamaskException.js';
|
|
8
|
+
import { OkxWalletException } from './OkxWalletException.js';
|
|
9
|
+
import { HttpRequestException } from './HttpRequestException.js';
|
|
10
|
+
import { TrustWalletException } from './TrustWalletException.js';
|
|
11
|
+
import { TransactionException } from './TransactionException.js';
|
|
12
|
+
import { LedgerCosmosException } from './LedgerCosmosException.js';
|
|
13
|
+
import { CosmosWalletException } from './CosmosWalletException.js';
|
|
14
|
+
import { RainbowWalletException } from './RainbowWalletException.js';
|
|
15
|
+
import { GrpcUnaryRequestException } from './GrpcUnaryRequestException.js';
|
|
15
16
|
import { TurnkeyWalletSessionException } from './TurnkeyWalletSessionException.js';
|
|
16
|
-
export { Web3Exception, LedgerException, TrezorException, WalletException,
|
|
17
|
+
export { Web3Exception, LedgerException, TrezorException, WalletException, BitGetException, GeneralException, MetamaskException, OkxWalletException, TransactionException, TrustWalletException, HttpRequestException, LedgerCosmosException, CosmosWalletException, RainbowWalletException, GrpcUnaryRequestException, TurnkeyWalletSessionException, };
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { GrpcUnaryRequestException } from './GrpcUnaryRequestException.js';
|
|
2
|
-
import { HttpRequestException } from './HttpRequestException.js';
|
|
3
1
|
import { Web3Exception } from './Web3Exception.js';
|
|
4
|
-
import { GeneralException } from './GeneralException.js';
|
|
5
2
|
import { LedgerException } from './LedgerException.js';
|
|
6
|
-
import { LedgerCosmosException } from './LedgerCosmosException.js';
|
|
7
|
-
import { MetamaskException } from './MetamaskException.js';
|
|
8
|
-
import { TrustWalletException } from './TrustWalletException.js';
|
|
9
|
-
import { OkxWalletException } from './OkxWalletException.js';
|
|
10
3
|
import { TrezorException } from './TrezorException.js';
|
|
11
|
-
import { CosmosWalletException } from './CosmosWalletException.js';
|
|
12
|
-
import { TransactionException } from './TransactionException.js';
|
|
13
4
|
import { WalletException } from './WalletException.js';
|
|
14
5
|
import { BitGetException } from './BitGetException.js';
|
|
6
|
+
import { GeneralException } from './GeneralException.js';
|
|
7
|
+
import { MetamaskException } from './MetamaskException.js';
|
|
8
|
+
import { OkxWalletException } from './OkxWalletException.js';
|
|
9
|
+
import { HttpRequestException } from './HttpRequestException.js';
|
|
10
|
+
import { TrustWalletException } from './TrustWalletException.js';
|
|
11
|
+
import { TransactionException } from './TransactionException.js';
|
|
12
|
+
import { LedgerCosmosException } from './LedgerCosmosException.js';
|
|
13
|
+
import { CosmosWalletException } from './CosmosWalletException.js';
|
|
14
|
+
import { RainbowWalletException } from './RainbowWalletException.js';
|
|
15
|
+
import { GrpcUnaryRequestException } from './GrpcUnaryRequestException.js';
|
|
15
16
|
import { TurnkeyWalletSessionException } from './TurnkeyWalletSessionException.js';
|
|
16
|
-
export { Web3Exception, LedgerException, TrezorException, WalletException,
|
|
17
|
+
export { Web3Exception, LedgerException, TrezorException, WalletException, BitGetException, GeneralException, MetamaskException, OkxWalletException, TransactionException, TrustWalletException, HttpRequestException, LedgerCosmosException, CosmosWalletException, RainbowWalletException, GrpcUnaryRequestException, TurnkeyWalletSessionException, };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/exceptions",
|
|
3
3
|
"description": "List of exceptions that can be reused throughout Injective's projects.",
|
|
4
|
-
"version": "1.15.
|
|
4
|
+
"version": "1.15.19",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"type": "module",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"shx": "^0.3.4"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "3c10a76aa66dec3c20e234db53280fd8ced12c11"
|
|
65
65
|
}
|