@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/index.browser.mjs
CHANGED
|
@@ -564,7 +564,7 @@ function getErrorMessage(code, context = {}) {
|
|
|
564
564
|
function isSolanaError(e, code) {
|
|
565
565
|
const isSolanaError2 = e instanceof Error && e.name === "SolanaError";
|
|
566
566
|
if (isSolanaError2) {
|
|
567
|
-
if (code !==
|
|
567
|
+
if (code !== void 0) {
|
|
568
568
|
return e.context.__code === code;
|
|
569
569
|
}
|
|
570
570
|
return true;
|
|
@@ -700,7 +700,7 @@ function getSolanaErrorFromInstructionError(index, instructionError) {
|
|
|
700
700
|
return {
|
|
701
701
|
errorName: rpcErrorName,
|
|
702
702
|
index: numberIndex,
|
|
703
|
-
...rpcErrorContext !==
|
|
703
|
+
...rpcErrorContext !== void 0 ? { instructionErrorContext: rpcErrorContext } : null
|
|
704
704
|
};
|
|
705
705
|
} else if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM) {
|
|
706
706
|
return {
|
|
@@ -778,7 +778,7 @@ function getSolanaErrorFromTransactionError(transactionError) {
|
|
|
778
778
|
if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN) {
|
|
779
779
|
return {
|
|
780
780
|
errorName: rpcErrorName,
|
|
781
|
-
...rpcErrorContext !==
|
|
781
|
+
...rpcErrorContext !== void 0 ? { transactionErrorContext: rpcErrorContext } : null
|
|
782
782
|
};
|
|
783
783
|
} else if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION) {
|
|
784
784
|
return {
|