@dubsdotapp/expo 0.2.36 → 0.2.38

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.mjs CHANGED
@@ -616,14 +616,35 @@ var MwaWalletAdapter = class {
616
616
  }
617
617
  async signAndSendTransaction(transaction) {
618
618
  if (!this._connected) throw new Error("Wallet not connected");
619
- const signature = await this.transact(async (wallet) => {
620
- const reauth = await wallet.reauthorize({ auth_token: this._authToken });
621
- this.applyAuthResult(reauth);
622
- const result = await wallet.signAndSendTransactions({
623
- transactions: [transaction]
619
+ let signature;
620
+ try {
621
+ signature = await this.transact(async (wallet) => {
622
+ const reauth = await wallet.reauthorize({ auth_token: this._authToken });
623
+ this.applyAuthResult(reauth);
624
+ const result = await wallet.signAndSendTransactions({
625
+ transactions: [transaction]
626
+ });
627
+ return result[0];
624
628
  });
625
- return result[0];
626
- });
629
+ } catch (err) {
630
+ console.error("[Dubs:MWA] ===== signAndSendTransaction ERROR DUMP =====");
631
+ console.error("[Dubs:MWA] typeof:", typeof err);
632
+ console.error("[Dubs:MWA] value:", err);
633
+ console.error("[Dubs:MWA] message:", err?.message);
634
+ console.error("[Dubs:MWA] name:", err?.name);
635
+ console.error("[Dubs:MWA] code:", err?.code);
636
+ console.error("[Dubs:MWA] cause:", err?.cause);
637
+ console.error("[Dubs:MWA] stack:", err?.stack);
638
+ console.error("[Dubs:MWA] JSON:", (() => {
639
+ try {
640
+ return JSON.stringify(err, Object.getOwnPropertyNames(err ?? {}));
641
+ } catch {
642
+ return "unstringifiable";
643
+ }
644
+ })());
645
+ console.error("[Dubs:MWA] ===== END DUMP =====");
646
+ throw err;
647
+ }
627
648
  if (signature instanceof Uint8Array) {
628
649
  return new PublicKey(signature).toBase58();
629
650
  }
@@ -1829,37 +1850,23 @@ function useClaim() {
1829
1850
  console.log("[useClaim] Complete!");
1830
1851
  return result;
1831
1852
  } catch (err) {
1832
- console.error("[useClaim] FAILED \u2014 raw error:", err);
1833
- console.log("[useClaim] Error type:", typeof err);
1834
- console.log("[useClaim] Error constructor:", err?.constructor?.name);
1835
- console.log("[useClaim] Error message:", err?.message);
1836
- console.log("[useClaim] Error keys:", err && typeof err === "object" ? Object.keys(err) : "N/A");
1837
- try {
1838
- console.log("[useClaim] JSON.stringify(err):", JSON.stringify(err));
1839
- } catch {
1840
- console.log("[useClaim] JSON.stringify failed");
1841
- }
1842
- let rawError;
1843
- if (err instanceof Error) {
1844
- const extras = {};
1845
- for (const key of Object.keys(err)) {
1846
- extras[key] = err[key];
1853
+ console.error("[useClaim] ===== CLAIM ERROR DUMP =====");
1854
+ console.error("[useClaim] typeof:", typeof err);
1855
+ console.error("[useClaim] value:", err);
1856
+ console.error("[useClaim] message:", err?.message);
1857
+ console.error("[useClaim] name:", err?.name);
1858
+ console.error("[useClaim] code:", err?.code);
1859
+ console.error("[useClaim] cause:", err?.cause);
1860
+ console.error("[useClaim] stack:", err?.stack);
1861
+ console.error("[useClaim] JSON:", (() => {
1862
+ try {
1863
+ return JSON.stringify(err, Object.getOwnPropertyNames(err ?? {}));
1864
+ } catch {
1865
+ return "unstringifiable";
1847
1866
  }
1848
- rawError = { message: err.message, ...extras };
1849
- } else {
1850
- rawError = err;
1851
- }
1852
- console.log("[useClaim] Serialized for /errors/parse:", JSON.stringify(rawError));
1853
- let parsed;
1854
- try {
1855
- parsed = await client.parseError(rawError);
1856
- console.log("[useClaim] Server parsed result:", JSON.stringify(parsed));
1857
- } catch (parseErr) {
1858
- console.error("[useClaim] /errors/parse call failed:", parseErr);
1859
- parsed = { code: "transaction_failed", message: err instanceof Error ? err.message : String(err) };
1860
- }
1861
- const error2 = new Error(parsed.message);
1862
- error2.code = parsed.code;
1867
+ })());
1868
+ console.error("[useClaim] ===== END DUMP =====");
1869
+ const error2 = err instanceof Error ? err : new Error(String(err));
1863
1870
  setError(error2);
1864
1871
  setStatus("error");
1865
1872
  throw error2;