@solana/web3.js 2.0.0-preview.3.20240717221343.8ea5794b4e8455dc32d3578c2f86bc0d7b827b8d → 2.0.0-preview.3.20240718123524.29821df246b14eb41dd4606913f44fac40183957

Sign up to get free protection for your applications and to get access to all the features.
@@ -3241,10 +3241,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
3241
3241
  payload,
3242
3242
  signal: options == null ? void 0 : options.abortSignal
3243
3243
  });
3244
- if ("error" in response) {
3245
- throw getSolanaErrorFromJsonRpcError(response.error);
3246
- }
3247
- return responseTransformer ? responseTransformer(response.result, methodName) : response.result;
3244
+ return responseTransformer ? responseTransformer(response, methodName) : response;
3248
3245
  }
3249
3246
  };
3250
3247
  }
@@ -3480,12 +3477,15 @@ this.globalThis.solanaWeb3 = (function (exports) {
3480
3477
  }
3481
3478
  function getDefaultResponseTransformerForSolanaRpc(config) {
3482
3479
  return (rawResponse, methodName) => {
3480
+ if ("error" in rawResponse) {
3481
+ throw getSolanaErrorFromJsonRpcError(rawResponse.error);
3482
+ }
3483
3483
  const keyPaths = (config == null ? void 0 : config.allowedNumericKeyPaths) && methodName ? config.allowedNumericKeyPaths[methodName] : void 0;
3484
3484
  const traverse = getTreeWalker([getBigIntUpcastVisitor(keyPaths != null ? keyPaths : [])]);
3485
3485
  const initialState = {
3486
3486
  keyPath: []
3487
3487
  };
3488
- return traverse(rawResponse, initialState);
3488
+ return traverse(rawResponse.result, initialState);
3489
3489
  };
3490
3490
  }
3491
3491
  var jsonParsedTokenAccountsConfigs = [
@@ -3949,7 +3949,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
3949
3949
  ...config.headers ? normalizeHeaders2(config.headers) : void 0,
3950
3950
  ...{
3951
3951
  // Keep these headers lowercase so they will override any user-supplied headers above.
3952
- "solana-client": (_a = `js/${"2.0.0-preview.3.20240717221343.8ea5794b4e8455dc32d3578c2f86bc0d7b827b8d"}`) != null ? _a : "UNKNOWN"
3952
+ "solana-client": (_a = `js/${"2.0.0-preview.3.20240718123524.29821df246b14eb41dd4606913f44fac40183957"}`) != null ? _a : "UNKNOWN"
3953
3953
  }
3954
3954
  }
3955
3955
  }),
@@ -4052,7 +4052,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
4052
4052
  if (!("params" in message) || message.params.subscription !== subscriptionId) {
4053
4053
  continue;
4054
4054
  }
4055
- const notification = message.params.result;
4055
+ const notification = message.params;
4056
4056
  yield responseTransformer ? responseTransformer(notification, subscribeMethodName) : notification;
4057
4057
  }
4058
4058
  }