coinley-pay 0.0.12 → 0.0.13

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/index.esm.js CHANGED
@@ -47301,6 +47301,7 @@ const RedesignedCoinleyPaymentInternal = ({
47301
47301
  const finalResult = await paymentFlow.api.processPayment(
47302
47302
  paymentData.id,
47303
47303
  result2.signature,
47304
+ selectedNetwork.shortName,
47304
47305
  solanaWallet.publicKey
47305
47306
  );
47306
47307
  if (finalResult.success) {
@@ -47331,20 +47332,18 @@ const RedesignedCoinleyPaymentInternal = ({
47331
47332
  }
47332
47333
  try {
47333
47334
  setCurrentStep(PAYMENT_STEPS.PROCESSING);
47334
- const result2 = await executePaymentTransaction();
47335
- if ((result2 == null ? void 0 : result2.success) && (result2 == null ? void 0 : result2.transactionHash)) {
47335
+ const txHash = await executePaymentTransaction();
47336
+ if (txHash) {
47336
47337
  setCurrentStep(PAYMENT_STEPS.SUCCESS);
47337
47338
  if (onSuccess) {
47338
47339
  onSuccess({
47339
47340
  paymentId: paymentData.id,
47340
- transactionHash: result2.transactionHash,
47341
+ transactionHash: txHash,
47341
47342
  senderAddress: address,
47342
47343
  network: selectedNetwork == null ? void 0 : selectedNetwork.shortName,
47343
47344
  currency: selectedToken == null ? void 0 : selectedToken.symbol
47344
47345
  });
47345
47346
  }
47346
- } else if (result2 == null ? void 0 : result2.error) {
47347
- throw new Error(result2.error);
47348
47347
  }
47349
47348
  } catch (err) {
47350
47349
  setError(err.message || "Transaction failed");