@dubsdotapp/expo 0.1.2 → 0.1.3

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.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "React Native SDK for the Dubs betting platform",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -26,7 +26,7 @@ export interface UseAuthResult {
26
26
  * Register a new user after authenticate() returned needsRegistration.
27
27
  * Reuses the nonce+signature from authenticate() — no second signing prompt.
28
28
  */
29
- register: (username: string, referralCode?: string) => Promise<void>;
29
+ register: (username: string, referralCode?: string, avatarUrl?: string) => Promise<void>;
30
30
 
31
31
  /** Log out and clear state */
32
32
  logout: () => Promise<void>;
@@ -107,7 +107,7 @@ export function useAuth(): UseAuthResult {
107
107
  }
108
108
  }, [client, wallet]);
109
109
 
110
- const register = useCallback(async (username: string, referralCode?: string) => {
110
+ const register = useCallback(async (username: string, referralCode?: string, avatarUrl?: string) => {
111
111
  try {
112
112
  const pending = pendingAuth.current;
113
113
  if (!pending) {
@@ -123,6 +123,7 @@ export function useAuth(): UseAuthResult {
123
123
  nonce: pending.nonce,
124
124
  username,
125
125
  referralCode,
126
+ avatarUrl,
126
127
  });
127
128
 
128
129
  pendingAuth.current = null;
package/src/types.ts CHANGED
@@ -287,6 +287,7 @@ export interface RegisterParams {
287
287
  nonce: string;
288
288
  username: string;
289
289
  referralCode?: string;
290
+ avatarUrl?: string;
290
291
  }
291
292
 
292
293
  export interface RegisterResult {