@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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/hooks/useAuth.ts +4 -2
- package/src/wallet/types.ts +1 -0
package/package.json
CHANGED
package/src/hooks/useAuth.ts
CHANGED
|
@@ -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
|