@solana/errors 2.1.0 → 2.1.1-canary-20250310215124
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/cli.mjs +1 -1
- package/dist/index.browser.cjs +3 -3
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.mjs +3 -3
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.native.mjs +3 -3
- package/dist/index.native.mjs.map +1 -1
- package/dist/index.node.cjs +3 -3
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.mjs +3 -3
- package/dist/index.node.mjs.map +1 -1
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
package/dist/index.browser.cjs
CHANGED
|
@@ -566,7 +566,7 @@ function getErrorMessage(code, context = {}) {
|
|
|
566
566
|
function isSolanaError(e, code) {
|
|
567
567
|
const isSolanaError2 = e instanceof Error && e.name === "SolanaError";
|
|
568
568
|
if (isSolanaError2) {
|
|
569
|
-
if (code !==
|
|
569
|
+
if (code !== void 0) {
|
|
570
570
|
return e.context.__code === code;
|
|
571
571
|
}
|
|
572
572
|
return true;
|
|
@@ -702,7 +702,7 @@ function getSolanaErrorFromInstructionError(index, instructionError) {
|
|
|
702
702
|
return {
|
|
703
703
|
errorName: rpcErrorName,
|
|
704
704
|
index: numberIndex,
|
|
705
|
-
...rpcErrorContext !==
|
|
705
|
+
...rpcErrorContext !== void 0 ? { instructionErrorContext: rpcErrorContext } : null
|
|
706
706
|
};
|
|
707
707
|
} else if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM) {
|
|
708
708
|
return {
|
|
@@ -780,7 +780,7 @@ function getSolanaErrorFromTransactionError(transactionError) {
|
|
|
780
780
|
if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN) {
|
|
781
781
|
return {
|
|
782
782
|
errorName: rpcErrorName,
|
|
783
|
-
...rpcErrorContext !==
|
|
783
|
+
...rpcErrorContext !== void 0 ? { transactionErrorContext: rpcErrorContext } : null
|
|
784
784
|
};
|
|
785
785
|
} else if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION) {
|
|
786
786
|
return {
|