File tree 3 files changed +40
-23
lines changed
UI/Option/TabLinks/MainWalletLinks
3 files changed +40
-23
lines changed Original file line number Diff line number Diff line change 41
41
42
42
const handleGetNonce = async (id : string ) => {
43
43
try {
44
- const msg = ` I am signing my one-time nonce: ${Math .floor (Math .random () * 10000 )} ` ;
45
-
46
- $tonConnector .setConnectRequestParameters ({
47
- state: " ready" ,
48
- value: { tonProof: msg },
44
+ const res: any = await nimbus .post (" /users/nonce?verified=true" , {
45
+ publicAddress: id ,
46
+ referrer: undefined ,
49
47
});
50
48
51
- $tonConnector .openModal ();
52
-
53
- $tonConnector .onStatusChange ((wallet ) => {
54
- if (
55
- wallet &&
56
- wallet .connectItems ?.tonProof &&
57
- " proof" in wallet .connectItems .tonProof
58
- ) {
59
- handleUpdatePublicAddress (wallet );
60
- }
61
- });
49
+ if (res && res .data ) {
50
+ const msg = ` I am signing my one-time nonce: ${res .data .nonce } ` ;
51
+
52
+ $tonConnector .setConnectRequestParameters ({
53
+ state: " ready" ,
54
+ value: { tonProof: msg },
55
+ });
56
+
57
+ $tonConnector .openModal ();
58
+
59
+ $tonConnector .onStatusChange ((wallet ) => {
60
+ if (
61
+ wallet &&
62
+ wallet .connectItems ?.tonProof &&
63
+ " proof" in wallet .connectItems .tonProof
64
+ ) {
65
+ handleUpdatePublicAddress (wallet );
66
+ }
67
+ });
68
+ }
62
69
} catch (e ) {
63
70
console .error (" error: " , e );
64
71
if ($tonConnector .connected ) {
Original file line number Diff line number Diff line change 108
108
109
109
const tonInstance = new TonConnectUI ({
110
110
manifestUrl:
111
- " https://gist.githubusercontent.com/toannhu96/0f9cdecbfa668157a901c76f41ced0f0/raw/0b8e76d86ca3ce0a14db9315c4e03ba3b9caaa60 /tonconnect-manifest.json" ,
111
+ " https://gist.githubusercontent.com/toannhu96/0f9cdecbfa668157a901c76f41ced0f0/raw/78bdaee6e4f101032bb97cfece71b79b7f28fbd5 /tonconnect-manifest.json" ,
112
112
});
113
113
tonConnector .update ((n ) => (n = tonInstance ));
114
114
});
Original file line number Diff line number Diff line change 22
22
23
23
import goldImg from " ~/assets/Gold4.svg" ;
24
24
import wheelIcon from " ~/assets/wheel-icon.svg" ;
25
+ import { getUserInfo } from " ~/lib/queryAPI" ;
25
26
26
27
export let currentRoute;
27
28
36
37
value: " checkin" ,
37
38
type: " Daily Checkin" ,
38
39
},
39
- {
40
- label: i18n (" checkinPage.tab-leaderboard" , " Flip GM Points" ),
41
- value: " flip" ,
42
- type: " Flip GM Points" ,
43
- },
40
+ // {
41
+ // label: i18n("checkinPage.tab-leaderboard", "Flip GM Points"),
42
+ // value: "flip",
43
+ // type: "Flip GM Points",
44
+ // },
44
45
// {
45
46
// label: i18n("checkinPage.tab-leaderboard", "Leaderboard"),
46
47
// value: "leaderboard",
143
144
return response ;
144
145
};
145
146
147
+ $ : queryUserInfo = createQuery ({
148
+ queryKey: [" users-me" ],
149
+ queryFn : () => getUserInfo (),
150
+ staleTime: Infinity ,
151
+ retry: false ,
152
+ });
153
+
154
+ $ : allowSuiCamp = $queryUserInfo .data ?.suiCampAllowed || false ;
155
+
146
156
$ : queryLinkSocial = createQuery ({
147
157
queryKey: [" link-socials" ],
148
158
queryFn : () => getLinkData (),
199
209
<ErrorBoundary >
200
210
<div class =" relative z-9" >
201
211
{#if socialData && socialData .find ((item ) => item .type === " twitter" )}
202
- {#if isSkipToMainPage }
212
+ {#if isSkipToMainPage || allowSuiCamp }
203
213
<div
204
214
class =" max-w-[2000px] m-auto xl:w-[90%] w-[90%] py-8 grid xl:grid-cols-6 grid-cols-1 gap-6 relative z-2"
205
215
>
You can’t perform that action at this time.
0 commit comments