@dubsdotapp/expo 0.2.8 → 0.2.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dubsdotapp/expo",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "description": "React Native SDK for the Dubs betting platform",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -77,17 +77,19 @@ export function useAuth(): UseAuthResult {
77
77
  throw new Error('Wallet does not support signMessage');
78
78
  }
79
79
 
80
- const walletAddress = wallet.publicKey.toBase58();
81
80
  setStatus('authenticating');
82
81
  setError(null);
83
82
 
83
+ const walletAddress = wallet.publicKey.toBase58();
84
+
84
85
  // 1. Get nonce
85
86
  const { nonce, message } = await client.getNonce(walletAddress);
86
87
 
87
88
  // 2. Sign message
88
89
  setStatus('signing');
89
90
  const messageBytes = new TextEncoder().encode(message);
90
- const signatureBytes = await wallet.signMessage(messageBytes);
91
+ const signatureBytes = await wallet.signMessage!(messageBytes);
92
+
91
93
  const signature = bs58.encode(signatureBytes);
92
94
 
93
95
  // 3. Verify with server
@@ -33,4 +33,5 @@ export interface WalletAdapter {
33
33
 
34
34
  /** Optional: Disconnect the wallet */
35
35
  disconnect?(): void | Promise<void>;
36
+
36
37
  }