@mezo-org/passport 0.17.2 → 0.17.3-dev.0.no-ui
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/src/hooks/useAuthenticateWithWallet.d.ts +11 -11
- package/dist/src/hooks/useEnsureNoSessionAndFetchNonce.d.ts.map +1 -1
- package/dist/src/hooks/useEnsureNoSessionAndFetchNonce.js +7 -8
- package/dist/src/hooks/useEnsureNoSessionAndFetchNonce.js.map +1 -1
- package/dist/src/hooks/useGetCurrentAccount.d.ts.map +1 -1
- package/dist/src/hooks/useGetCurrentAccount.js +3 -0
- package/dist/src/hooks/useGetCurrentAccount.js.map +1 -1
- package/dist/src/hooks/useSignInWithWallet.d.ts +11 -11
- package/dist/src/hooks/useSignOut.d.ts.map +1 -1
- package/dist/src/hooks/useSignOut.js +5 -3
- package/dist/src/hooks/useSignOut.js.map +1 -1
- package/dist/src/hooks/useSignUpWithWallet.d.ts +11 -11
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +0 -1
- package/dist/src/index.js.map +1 -1
- package/package.json +1 -1
- package/src/hooks/useEnsureNoSessionAndFetchNonce.ts +10 -9
- package/src/hooks/useGetCurrentAccount.ts +3 -0
- package/src/hooks/useSignOut.ts +5 -3
- package/src/index.ts +0 -1
- package/dist/src/assets/DefaultAvatar.d.ts +0 -5
- package/dist/src/assets/DefaultAvatar.d.ts.map +0 -1
- package/dist/src/assets/DefaultAvatar.js +0 -21
- package/dist/src/assets/DefaultAvatar.js.map +0 -1
- package/dist/src/assets/EditIcon.d.ts +0 -5
- package/dist/src/assets/EditIcon.d.ts.map +0 -1
- package/dist/src/assets/EditIcon.js +0 -10
- package/dist/src/assets/EditIcon.js.map +0 -1
- package/dist/src/components/Dropdown/ConnectedTrigger.d.ts +0 -8
- package/dist/src/components/Dropdown/ConnectedTrigger.d.ts.map +0 -1
- package/dist/src/components/Dropdown/ConnectedTrigger.js +0 -39
- package/dist/src/components/Dropdown/ConnectedTrigger.js.map +0 -1
- package/dist/src/components/Dropdown/Content.d.ts +0 -8
- package/dist/src/components/Dropdown/Content.d.ts.map +0 -1
- package/dist/src/components/Dropdown/Content.js +0 -29
- package/dist/src/components/Dropdown/Content.js.map +0 -1
- package/dist/src/components/Dropdown/DisconnectedTrigger.d.ts +0 -7
- package/dist/src/components/Dropdown/DisconnectedTrigger.d.ts.map +0 -1
- package/dist/src/components/Dropdown/DisconnectedTrigger.js +0 -13
- package/dist/src/components/Dropdown/DisconnectedTrigger.js.map +0 -1
- package/dist/src/components/Dropdown/Dropdown.d.ts +0 -23
- package/dist/src/components/Dropdown/Dropdown.d.ts.map +0 -1
- package/dist/src/components/Dropdown/Dropdown.js +0 -45
- package/dist/src/components/Dropdown/Dropdown.js.map +0 -1
- package/dist/src/components/Dropdown/ListingItem.d.ts +0 -16
- package/dist/src/components/Dropdown/ListingItem.d.ts.map +0 -1
- package/dist/src/components/Dropdown/ListingItem.js +0 -45
- package/dist/src/components/Dropdown/ListingItem.js.map +0 -1
- package/dist/src/components/Dropdown/NestedViewLayout.d.ts +0 -8
- package/dist/src/components/Dropdown/NestedViewLayout.d.ts.map +0 -1
- package/dist/src/components/Dropdown/NestedViewLayout.js +0 -33
- package/dist/src/components/Dropdown/NestedViewLayout.js.map +0 -1
- package/dist/src/components/Dropdown/Receive/Receive.d.ts +0 -4
- package/dist/src/components/Dropdown/Receive/Receive.d.ts.map +0 -1
- package/dist/src/components/Dropdown/Receive/Receive.js +0 -64
- package/dist/src/components/Dropdown/Receive/Receive.js.map +0 -1
- package/dist/src/components/Dropdown/Root/AccountAddressActions.d.ts +0 -4
- package/dist/src/components/Dropdown/Root/AccountAddressActions.d.ts.map +0 -1
- package/dist/src/components/Dropdown/Root/AccountAddressActions.js +0 -49
- package/dist/src/components/Dropdown/Root/AccountAddressActions.js.map +0 -1
- package/dist/src/components/Dropdown/Root/AccountBalance.d.ts +0 -6
- package/dist/src/components/Dropdown/Root/AccountBalance.d.ts.map +0 -1
- package/dist/src/components/Dropdown/Root/AccountBalance.js +0 -32
- package/dist/src/components/Dropdown/Root/AccountBalance.js.map +0 -1
- package/dist/src/components/Dropdown/Root/AccountBtcListing.d.ts +0 -6
- package/dist/src/components/Dropdown/Root/AccountBtcListing.d.ts.map +0 -1
- package/dist/src/components/Dropdown/Root/AccountBtcListing.js +0 -28
- package/dist/src/components/Dropdown/Root/AccountBtcListing.js.map +0 -1
- package/dist/src/components/Dropdown/Root/AccountError.d.ts +0 -8
- package/dist/src/components/Dropdown/Root/AccountError.d.ts.map +0 -1
- package/dist/src/components/Dropdown/Root/AccountError.js +0 -17
- package/dist/src/components/Dropdown/Root/AccountError.js.map +0 -1
- package/dist/src/components/Dropdown/Root/AccountMezoListing.d.ts +0 -4
- package/dist/src/components/Dropdown/Root/AccountMezoListing.d.ts.map +0 -1
- package/dist/src/components/Dropdown/Root/AccountMezoListing.js +0 -30
- package/dist/src/components/Dropdown/Root/AccountMezoListing.js.map +0 -1
- package/dist/src/components/Dropdown/Root/AccountMusdListing.d.ts +0 -4
- package/dist/src/components/Dropdown/Root/AccountMusdListing.d.ts.map +0 -1
- package/dist/src/components/Dropdown/Root/AccountMusdListing.js +0 -21
- package/dist/src/components/Dropdown/Root/AccountMusdListing.js.map +0 -1
- package/dist/src/components/Dropdown/Root/AccountOtherAssets.d.ts +0 -8
- package/dist/src/components/Dropdown/Root/AccountOtherAssets.d.ts.map +0 -1
- package/dist/src/components/Dropdown/Root/AccountOtherAssets.js +0 -43
- package/dist/src/components/Dropdown/Root/AccountOtherAssets.js.map +0 -1
- package/dist/src/components/Dropdown/Root/Root.d.ts +0 -8
- package/dist/src/components/Dropdown/Root/Root.d.ts.map +0 -1
- package/dist/src/components/Dropdown/Root/Root.js +0 -51
- package/dist/src/components/Dropdown/Root/Root.js.map +0 -1
- package/dist/src/components/Dropdown/Root/WalletAddress.d.ts +0 -4
- package/dist/src/components/Dropdown/Root/WalletAddress.d.ts.map +0 -1
- package/dist/src/components/Dropdown/Root/WalletAddress.js +0 -66
- package/dist/src/components/Dropdown/Root/WalletAddress.js.map +0 -1
- package/dist/src/components/Dropdown/Root/WelcomeBlock.d.ts +0 -6
- package/dist/src/components/Dropdown/Root/WelcomeBlock.d.ts.map +0 -1
- package/dist/src/components/Dropdown/Root/WelcomeBlock.js +0 -88
- package/dist/src/components/Dropdown/Root/WelcomeBlock.js.map +0 -1
- package/dist/src/components/Dropdown/Settings/InlineEditField.d.ts +0 -12
- package/dist/src/components/Dropdown/Settings/InlineEditField.d.ts.map +0 -1
- package/dist/src/components/Dropdown/Settings/InlineEditField.js +0 -95
- package/dist/src/components/Dropdown/Settings/InlineEditField.js.map +0 -1
- package/dist/src/components/Dropdown/Settings/Settings.d.ts +0 -4
- package/dist/src/components/Dropdown/Settings/Settings.d.ts.map +0 -1
- package/dist/src/components/Dropdown/Settings/Settings.js +0 -36
- package/dist/src/components/Dropdown/Settings/Settings.js.map +0 -1
- package/dist/src/components/Dropdown/SlotNumber.d.ts +0 -19
- package/dist/src/components/Dropdown/SlotNumber.d.ts.map +0 -1
- package/dist/src/components/Dropdown/SlotNumber.js +0 -67
- package/dist/src/components/Dropdown/SlotNumber.js.map +0 -1
- package/dist/src/components/Dropdown/TestnetTopBanner.d.ts +0 -3
- package/dist/src/components/Dropdown/TestnetTopBanner.d.ts.map +0 -1
- package/dist/src/components/Dropdown/TestnetTopBanner.js +0 -14
- package/dist/src/components/Dropdown/TestnetTopBanner.js.map +0 -1
- package/dist/src/components/Dropdown/index.d.ts +0 -3
- package/dist/src/components/Dropdown/index.d.ts.map +0 -1
- package/dist/src/components/Dropdown/index.js +0 -2
- package/dist/src/components/Dropdown/index.js.map +0 -1
- package/dist/src/components/index.d.ts +0 -2
- package/dist/src/components/index.d.ts.map +0 -1
- package/dist/src/components/index.js +0 -2
- package/dist/src/components/index.js.map +0 -1
- package/src/assets/DefaultAvatar.tsx +0 -74
- package/src/assets/EditIcon.tsx +0 -33
- package/src/components/Dropdown/ConnectedTrigger.tsx +0 -76
- package/src/components/Dropdown/Content.tsx +0 -56
- package/src/components/Dropdown/DisconnectedTrigger.tsx +0 -36
- package/src/components/Dropdown/Dropdown.tsx +0 -100
- package/src/components/Dropdown/ListingItem.tsx +0 -195
- package/src/components/Dropdown/NestedViewLayout.tsx +0 -88
- package/src/components/Dropdown/README.md +0 -41
- package/src/components/Dropdown/Receive/Receive.tsx +0 -144
- package/src/components/Dropdown/Root/AccountAddressActions.tsx +0 -99
- package/src/components/Dropdown/Root/AccountBalance.tsx +0 -69
- package/src/components/Dropdown/Root/AccountBtcListing.tsx +0 -53
- package/src/components/Dropdown/Root/AccountError.tsx +0 -34
- package/src/components/Dropdown/Root/AccountMezoListing.tsx +0 -55
- package/src/components/Dropdown/Root/AccountMusdListing.tsx +0 -45
- package/src/components/Dropdown/Root/AccountOtherAssets.tsx +0 -85
- package/src/components/Dropdown/Root/Root.tsx +0 -107
- package/src/components/Dropdown/Root/WalletAddress.tsx +0 -123
- package/src/components/Dropdown/Root/WelcomeBlock.tsx +0 -173
- package/src/components/Dropdown/Settings/InlineEditField.tsx +0 -214
- package/src/components/Dropdown/Settings/Settings.tsx +0 -87
- package/src/components/Dropdown/SlotNumber.tsx +0 -131
- package/src/components/Dropdown/TestnetTopBanner.tsx +0 -32
- package/src/components/Dropdown/index.ts +0 -2
- package/src/components/index.ts +0 -1
|
@@ -15,11 +15,11 @@ declare function useAuthenticateWithWallet(shouldCreateAccount?: boolean, mutati
|
|
|
15
15
|
failureReason: Error | null;
|
|
16
16
|
isPaused: boolean;
|
|
17
17
|
submittedAt: number;
|
|
18
|
-
authenticateWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void
|
|
19
|
-
authenticateWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void
|
|
18
|
+
authenticateWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
19
|
+
authenticateWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
20
20
|
} | {
|
|
21
21
|
data: undefined;
|
|
22
|
-
variables: number | void
|
|
22
|
+
variables: number | void;
|
|
23
23
|
error: null;
|
|
24
24
|
isError: false;
|
|
25
25
|
isIdle: false;
|
|
@@ -32,12 +32,12 @@ declare function useAuthenticateWithWallet(shouldCreateAccount?: boolean, mutati
|
|
|
32
32
|
failureReason: Error | null;
|
|
33
33
|
isPaused: boolean;
|
|
34
34
|
submittedAt: number;
|
|
35
|
-
authenticateWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void
|
|
36
|
-
authenticateWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void
|
|
35
|
+
authenticateWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
36
|
+
authenticateWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
37
37
|
} | {
|
|
38
38
|
data: undefined;
|
|
39
39
|
error: Error;
|
|
40
|
-
variables: number | void
|
|
40
|
+
variables: number | void;
|
|
41
41
|
isError: true;
|
|
42
42
|
isIdle: false;
|
|
43
43
|
isPending: false;
|
|
@@ -49,12 +49,12 @@ declare function useAuthenticateWithWallet(shouldCreateAccount?: boolean, mutati
|
|
|
49
49
|
failureReason: Error | null;
|
|
50
50
|
isPaused: boolean;
|
|
51
51
|
submittedAt: number;
|
|
52
|
-
authenticateWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void
|
|
53
|
-
authenticateWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void
|
|
52
|
+
authenticateWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
53
|
+
authenticateWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
54
54
|
} | {
|
|
55
55
|
data: Session;
|
|
56
56
|
error: null;
|
|
57
|
-
variables: number | void
|
|
57
|
+
variables: number | void;
|
|
58
58
|
isError: false;
|
|
59
59
|
isIdle: false;
|
|
60
60
|
isPending: false;
|
|
@@ -66,8 +66,8 @@ declare function useAuthenticateWithWallet(shouldCreateAccount?: boolean, mutati
|
|
|
66
66
|
failureReason: Error | null;
|
|
67
67
|
isPaused: boolean;
|
|
68
68
|
submittedAt: number;
|
|
69
|
-
authenticateWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void
|
|
70
|
-
authenticateWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void
|
|
69
|
+
authenticateWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
70
|
+
authenticateWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
71
71
|
};
|
|
72
72
|
export { useAuthenticateWithWallet };
|
|
73
73
|
//# sourceMappingURL=useAuthenticateWithWallet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEnsureNoSessionAndFetchNonce.d.ts","sourceRoot":"","sources":["../../../src/hooks/useEnsureNoSessionAndFetchNonce.ts"],"names":[],"mappings":"AAIA,iBAAS,+BAA+B;;
|
|
1
|
+
{"version":3,"file":"useEnsureNoSessionAndFetchNonce.d.ts","sourceRoot":"","sources":["../../../src/hooks/useEnsureNoSessionAndFetchNonce.ts"],"names":[],"mappings":"AAIA,iBAAS,+BAA+B;;EAwCvC;AAED,OAAO,EAAE,+BAA+B,EAAE,CAAA"}
|
|
@@ -2,8 +2,7 @@ import { useCallback } from "react";
|
|
|
2
2
|
import { useGetSession } from "./useGetSession";
|
|
3
3
|
import { useSignOut } from "./useSignOut";
|
|
4
4
|
function useEnsureNoSessionAndFetchNonce() {
|
|
5
|
-
const { refetch: getSession } = useGetSession(undefined, {
|
|
6
|
-
enabled: false,
|
|
5
|
+
const { data: session, refetch: getSession } = useGetSession(undefined, {
|
|
7
6
|
retry: false,
|
|
8
7
|
});
|
|
9
8
|
const { signOutAsync } = useSignOut();
|
|
@@ -19,15 +18,15 @@ function useEnsureNoSessionAndFetchNonce() {
|
|
|
19
18
|
return getSessionResult.data;
|
|
20
19
|
}, [getSession]);
|
|
21
20
|
const ensureNoSessionAndFetchNonce = useCallback(async () => {
|
|
22
|
-
|
|
23
|
-
if (!("nonce" in getSessionResult)) {
|
|
21
|
+
if (!session || !("nonce" in session)) {
|
|
24
22
|
// If there is active session we are terminating it
|
|
25
23
|
await signOutAsync();
|
|
26
|
-
// Because we
|
|
27
|
-
getSessionResult = (await getAndValidateSession());
|
|
24
|
+
// Because we signed out we can assume nonce will be returned here
|
|
25
|
+
const getSessionResult = (await getAndValidateSession());
|
|
26
|
+
return getSessionResult.nonce;
|
|
28
27
|
}
|
|
29
|
-
return
|
|
30
|
-
}, [getAndValidateSession, signOutAsync]);
|
|
28
|
+
return session.nonce;
|
|
29
|
+
}, [getAndValidateSession, session, signOutAsync]);
|
|
31
30
|
return { ensureNoSessionAndFetchNonce };
|
|
32
31
|
}
|
|
33
32
|
export { useEnsureNoSessionAndFetchNonce };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEnsureNoSessionAndFetchNonce.js","sourceRoot":"","sources":["../../../src/hooks/useEnsureNoSessionAndFetchNonce.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,SAAS,+BAA+B;IACtC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,aAAa,CAAC,SAAS,EAAE;
|
|
1
|
+
{"version":3,"file":"useEnsureNoSessionAndFetchNonce.js","sourceRoot":"","sources":["../../../src/hooks/useEnsureNoSessionAndFetchNonce.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,M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AAE,CAAA;AACzC,CAAC;AAED,OAAO,EAAE,+BAA+B,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetCurrentAccount.d.ts","sourceRoot":"","sources":["../../../src/hooks/useGetCurrentAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,eAAe,EACf,cAAc,EACf,MAAM,uBAAuB,CAAA;AAI9B,OAAO,KAAK,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"useGetCurrentAccount.d.ts","sourceRoot":"","sources":["../../../src/hooks/useGetCurrentAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,eAAe,EACf,cAAc,EACf,MAAM,uBAAuB,CAAA;AAI9B,OAAO,KAAK,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAIpE,KAAK,iCAAiC,GAAG,yBAAyB,GAAG;IACnE,IAAI,EAAE,WAAW,EAAE,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,KAAK,2BAA2B,CAAC,SAAS,IAAI,IAAI,CAChD,eAAe,CAAC,iCAAiC,EAAE,KAAK,EAAE,SAAS,CAAC,EACpE,UAAU,GAAG,SAAS,CACvB,CAAA;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,GAAG,iCAAiC,EAE7C,OAAO,GAAE,2BAA2B,CAAC,SAAS,CAAM,GACnD,cAAc,CAAC,SAAS,EAAE,KAAK,CAAC,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,CAkE3D"}
|
|
@@ -3,12 +3,14 @@ import { ONE_MINUTE_MS } from "../utils/time";
|
|
|
3
3
|
import { QUERY_KEYS } from "./constants";
|
|
4
4
|
import { useAuthApiClient } from "./useAuthApiClient";
|
|
5
5
|
import { useRewardsApiClient } from "./useRewardsApiClient";
|
|
6
|
+
import { useGetSession } from "./useGetSession";
|
|
6
7
|
/**
|
|
7
8
|
* Hook to fetch current account with mats
|
|
8
9
|
*/
|
|
9
10
|
export function useGetCurrentAccount(options = {}) {
|
|
10
11
|
const authApiClient = useAuthApiClient();
|
|
11
12
|
const rewardsApiClient = useRewardsApiClient();
|
|
13
|
+
const { data: session } = useGetSession();
|
|
12
14
|
const queryKey = [QUERY_KEYS.ACCOUNT, QUERY_KEYS.CURRENT];
|
|
13
15
|
const query = useQuery({
|
|
14
16
|
queryKey,
|
|
@@ -49,6 +51,7 @@ export function useGetCurrentAccount(options = {}) {
|
|
|
49
51
|
},
|
|
50
52
|
staleTime: options.staleTime ?? ONE_MINUTE_MS,
|
|
51
53
|
retry: options.retry ?? 1,
|
|
54
|
+
enabled: !!session && !("nonce" in session),
|
|
52
55
|
...options,
|
|
53
56
|
});
|
|
54
57
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetCurrentAccount.js","sourceRoot":"","sources":["../../../src/hooks/useGetCurrentAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,GAGT,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"useGetCurrentAccount.js","sourceRoot":"","sources":["../../../src/hooks/useGetCurrentAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,GAGT,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,OAAO,EAAE,mBAAmB,E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GAAG,IAAI,CAAC,MAAM,CAC3B,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,CAAC,OAAO,GAAG,WAAW,CAAC,SAAS,CAAC,IAAI,EAC9D,CAAC,CACF,CAAA;gBAED,OAAO;oBACL,GAAG,cAAc;oBACjB,IAAI;oBACJ,SAAS;iBACV,CAAA;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,mEAAmE;gBACnE,6CAA6C;gBAC7C,OAAO;oBACL,GAAG,cAAc;oBACjB,IAAI,EAAE;wBACJ;4BACE,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE;4BAClC,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE;yBACnC;qBACF;oBACD,SAAS,EAAE,CAAC;iBACb,CAAA;YACH,CAAC;QACH,CAAC;QACD,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,aAAa;QAC7C,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;QACzB,OAAO,EAAE,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,IAAI,OAAO,CAAC;QAC3C,GAAG,OAAO;KACX,CAAC,CAAA;IAEF,OAAO;QACL,GAAG,KAAK;QACR,QAAQ;KACT,CAAA;AACH,CAAC"}
|
|
@@ -15,11 +15,11 @@ declare function useSignInWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
15
15
|
failureReason: Error | null;
|
|
16
16
|
isPaused: boolean;
|
|
17
17
|
submittedAt: number;
|
|
18
|
-
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void
|
|
19
|
-
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void
|
|
18
|
+
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
19
|
+
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
20
20
|
} | {
|
|
21
21
|
data: undefined;
|
|
22
|
-
variables: number | void
|
|
22
|
+
variables: number | void;
|
|
23
23
|
error: null;
|
|
24
24
|
isError: false;
|
|
25
25
|
isIdle: false;
|
|
@@ -32,12 +32,12 @@ declare function useSignInWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
32
32
|
failureReason: Error | null;
|
|
33
33
|
isPaused: boolean;
|
|
34
34
|
submittedAt: number;
|
|
35
|
-
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void
|
|
36
|
-
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void
|
|
35
|
+
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
36
|
+
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
37
37
|
} | {
|
|
38
38
|
data: undefined;
|
|
39
39
|
error: Error;
|
|
40
|
-
variables: number | void
|
|
40
|
+
variables: number | void;
|
|
41
41
|
isError: true;
|
|
42
42
|
isIdle: false;
|
|
43
43
|
isPending: false;
|
|
@@ -49,12 +49,12 @@ declare function useSignInWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
49
49
|
failureReason: Error | null;
|
|
50
50
|
isPaused: boolean;
|
|
51
51
|
submittedAt: number;
|
|
52
|
-
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void
|
|
53
|
-
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void
|
|
52
|
+
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
53
|
+
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
54
54
|
} | {
|
|
55
55
|
data: Session;
|
|
56
56
|
error: null;
|
|
57
|
-
variables: number | void
|
|
57
|
+
variables: number | void;
|
|
58
58
|
isError: false;
|
|
59
59
|
isIdle: false;
|
|
60
60
|
isPending: false;
|
|
@@ -66,8 +66,8 @@ declare function useSignInWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
66
66
|
failureReason: Error | null;
|
|
67
67
|
isPaused: boolean;
|
|
68
68
|
submittedAt: number;
|
|
69
|
-
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void
|
|
70
|
-
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void
|
|
69
|
+
signInWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
70
|
+
signInWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
71
71
|
};
|
|
72
72
|
export { useSignInWithWallet };
|
|
73
73
|
//# sourceMappingURL=useSignInWithWallet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignOut.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSignOut.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAGhB,MAAM,uBAAuB,CAAA;AAG9B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAA;AAEnD,wBAAgB,UAAU,CACxB,eAAe,GAAE,IAAI,CACnB,eAAe,CAAC,qBAAqB,CAAC,EACtC,YAAY,GAAG,aAAa,CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useSignOut.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSignOut.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAGhB,MAAM,uBAAuB,CAAA;AAG9B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAA;AAEnD,wBAAgB,UAAU,CACxB,eAAe,GAAE,IAAI,CACnB,eAAe,CAAC,qBAAqB,CAAC,EACtC,YAAY,GAAG,aAAa,CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBP"}
|
|
@@ -7,9 +7,11 @@ export function useSignOut(mutationOptions = {}) {
|
|
|
7
7
|
const { onSuccess: customOnSuccess, ...restMutationOptions } = mutationOptions;
|
|
8
8
|
const { mutate, mutateAsync, ...rest } = useMutation({
|
|
9
9
|
mutationFn: () => authApiClient.deleteSession(),
|
|
10
|
-
onSuccess: (data, variables, context) => {
|
|
11
|
-
|
|
12
|
-
queryClient.resetQueries({
|
|
10
|
+
onSuccess: async (data, variables, context) => {
|
|
11
|
+
console.log("resetting session...");
|
|
12
|
+
await queryClient.resetQueries({ queryKey: [QUERY_KEYS.SESSION] });
|
|
13
|
+
console.log("resetting current account...");
|
|
14
|
+
await queryClient.resetQueries({
|
|
13
15
|
queryKey: [QUERY_KEYS.ACCOUNT, QUERY_KEYS.CURRENT],
|
|
14
16
|
});
|
|
15
17
|
if (customOnSuccess)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignOut.js","sourceRoot":"","sources":["../../../src/hooks/useSignOut.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,EACX,cAAc,GACf,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAGxC,MAAM,UAAU,UAAU,CACxB,kBAGI,EAAE;IAEN,MAAM,WAAW,GAAG,cAAc,EAAE,CAAA;IACpC,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAA;IAExC,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,mBAAmB,EAAE,GAAG,eAAe,CAAA;IAE9E,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,WAAW,CAAC;QACnD,UAAU,EAAE,GAAG,EAAE,CAAC,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AAE,WAAW,EAAE,GAAG,IAAI,EAAE,CAAA;AAChE,CAAC"}
|
|
@@ -15,11 +15,11 @@ declare function useSignUpWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
15
15
|
failureReason: Error | null;
|
|
16
16
|
isPaused: boolean;
|
|
17
17
|
submittedAt: number;
|
|
18
|
-
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void
|
|
19
|
-
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void
|
|
18
|
+
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
19
|
+
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
20
20
|
} | {
|
|
21
21
|
data: undefined;
|
|
22
|
-
variables: number | void
|
|
22
|
+
variables: number | void;
|
|
23
23
|
error: null;
|
|
24
24
|
isError: false;
|
|
25
25
|
isIdle: false;
|
|
@@ -32,12 +32,12 @@ declare function useSignUpWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
32
32
|
failureReason: Error | null;
|
|
33
33
|
isPaused: boolean;
|
|
34
34
|
submittedAt: number;
|
|
35
|
-
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void
|
|
36
|
-
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void
|
|
35
|
+
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
36
|
+
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
37
37
|
} | {
|
|
38
38
|
data: undefined;
|
|
39
39
|
error: Error;
|
|
40
|
-
variables: number | void
|
|
40
|
+
variables: number | void;
|
|
41
41
|
isError: true;
|
|
42
42
|
isIdle: false;
|
|
43
43
|
isPending: false;
|
|
@@ -49,12 +49,12 @@ declare function useSignUpWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
49
49
|
failureReason: Error | null;
|
|
50
50
|
isPaused: boolean;
|
|
51
51
|
submittedAt: number;
|
|
52
|
-
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void
|
|
53
|
-
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void
|
|
52
|
+
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
53
|
+
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
54
54
|
} | {
|
|
55
55
|
data: Session;
|
|
56
56
|
error: null;
|
|
57
|
-
variables: number | void
|
|
57
|
+
variables: number | void;
|
|
58
58
|
isError: false;
|
|
59
59
|
isIdle: false;
|
|
60
60
|
isPending: false;
|
|
@@ -66,8 +66,8 @@ declare function useSignUpWithWallet(mutationOptions?: Omit<MutationOptions<Sess
|
|
|
66
66
|
failureReason: Error | null;
|
|
67
67
|
isPaused: boolean;
|
|
68
68
|
submittedAt: number;
|
|
69
|
-
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void
|
|
70
|
-
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void
|
|
69
|
+
signUpWithWallet: import("@tanstack/react-query").UseMutateFunction<Session, Error, number | void, unknown>;
|
|
70
|
+
signUpWithWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Session, Error, number | void, unknown>;
|
|
71
71
|
};
|
|
72
72
|
export { useSignUpWithWallet };
|
|
73
73
|
//# sourceMappingURL=useSignUpWithWallet.d.ts.map
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from "./components";
|
|
2
1
|
export { unisatWalletMezoMainnet, unisatWalletMezoTestnet, okxWalletMezoMainnet, okxWalletMezoTestnet, xverseWalletMezoMainnet, xverseWalletMezoTestnet, getDefaultWallets, getConfig, } from "./config";
|
|
3
2
|
export * from "./constants";
|
|
4
3
|
export * from "./hooks";
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,GACV,MAAM,UAAU,CAAA;AACjB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/src/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from "./components";
|
|
2
1
|
export { unisatWalletMezoMainnet, unisatWalletMezoTestnet, okxWalletMezoMainnet, okxWalletMezoTestnet, xverseWalletMezoMainnet, xverseWalletMezoTestnet, getDefaultWallets, getConfig, } from "./config";
|
|
3
2
|
export * from "./constants";
|
|
4
3
|
export * from "./hooks";
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,GACV,MAAM,UAAU,CAAA;AACjB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAA"}
|
package/package.json
CHANGED
|
@@ -3,8 +3,7 @@ import { useGetSession } from "./useGetSession"
|
|
|
3
3
|
import { useSignOut } from "./useSignOut"
|
|
4
4
|
|
|
5
5
|
function useEnsureNoSessionAndFetchNonce() {
|
|
6
|
-
const { refetch: getSession } = useGetSession(undefined, {
|
|
7
|
-
enabled: false,
|
|
6
|
+
const { data: session, refetch: getSession } = useGetSession(undefined, {
|
|
8
7
|
retry: false,
|
|
9
8
|
})
|
|
10
9
|
const { signOutAsync } = useSignOut()
|
|
@@ -28,17 +27,19 @@ function useEnsureNoSessionAndFetchNonce() {
|
|
|
28
27
|
}, [getSession])
|
|
29
28
|
|
|
30
29
|
const ensureNoSessionAndFetchNonce = useCallback(async () => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (!("nonce" in getSessionResult)) {
|
|
30
|
+
if (!session || !("nonce" in session)) {
|
|
34
31
|
// If there is active session we are terminating it
|
|
35
32
|
await signOutAsync()
|
|
36
|
-
// Because we
|
|
37
|
-
getSessionResult = (await getAndValidateSession()) as {
|
|
33
|
+
// Because we signed out we can assume nonce will be returned here
|
|
34
|
+
const getSessionResult = (await getAndValidateSession()) as {
|
|
35
|
+
nonce: string
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return getSessionResult.nonce
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
return
|
|
41
|
-
}, [getAndValidateSession, signOutAsync])
|
|
41
|
+
return session.nonce
|
|
42
|
+
}, [getAndValidateSession, session, signOutAsync])
|
|
42
43
|
|
|
43
44
|
return { ensureNoSessionAndFetchNonce }
|
|
44
45
|
}
|
|
@@ -9,6 +9,7 @@ import { QUERY_KEYS } from "./constants"
|
|
|
9
9
|
import { useAuthApiClient } from "./useAuthApiClient"
|
|
10
10
|
import type { GetCurrentAccountResponse, RewardsMats } from "../api"
|
|
11
11
|
import { useRewardsApiClient } from "./useRewardsApiClient"
|
|
12
|
+
import { useGetSession } from "./useGetSession"
|
|
12
13
|
|
|
13
14
|
type GetCurrentAccountResponseWithMats = GetCurrentAccountResponse & {
|
|
14
15
|
mats: RewardsMats[]
|
|
@@ -30,6 +31,7 @@ export function useGetCurrentAccount<
|
|
|
30
31
|
): UseQueryResult<TSelected, Error> & { queryKey: QueryKey } {
|
|
31
32
|
const authApiClient = useAuthApiClient()
|
|
32
33
|
const rewardsApiClient = useRewardsApiClient()
|
|
34
|
+
const { data: session } = useGetSession()
|
|
33
35
|
|
|
34
36
|
const queryKey = [QUERY_KEYS.ACCOUNT, QUERY_KEYS.CURRENT]
|
|
35
37
|
|
|
@@ -84,6 +86,7 @@ export function useGetCurrentAccount<
|
|
|
84
86
|
},
|
|
85
87
|
staleTime: options.staleTime ?? ONE_MINUTE_MS,
|
|
86
88
|
retry: options.retry ?? 1,
|
|
89
|
+
enabled: !!session && !("nonce" in session),
|
|
87
90
|
...options,
|
|
88
91
|
})
|
|
89
92
|
|
package/src/hooks/useSignOut.ts
CHANGED
|
@@ -20,9 +20,11 @@ export function useSignOut(
|
|
|
20
20
|
|
|
21
21
|
const { mutate, mutateAsync, ...rest } = useMutation({
|
|
22
22
|
mutationFn: () => authApiClient.deleteSession(),
|
|
23
|
-
onSuccess: (data, variables, context) => {
|
|
24
|
-
|
|
25
|
-
queryClient.resetQueries({
|
|
23
|
+
onSuccess: async (data, variables, context) => {
|
|
24
|
+
console.log("resetting session...")
|
|
25
|
+
await queryClient.resetQueries({ queryKey: [QUERY_KEYS.SESSION] })
|
|
26
|
+
console.log("resetting current account...")
|
|
27
|
+
await queryClient.resetQueries({
|
|
26
28
|
queryKey: [QUERY_KEYS.ACCOUNT, QUERY_KEYS.CURRENT],
|
|
27
29
|
})
|
|
28
30
|
|
package/src/index.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultAvatar.d.ts","sourceRoot":"","sources":["../../../src/assets/DefaultAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAmB,MAAM,OAAO,CAAA;AAoEvC,iBAAS,sBAAsB,CAAC,KAAK,EAAE,UAAU,qBAEhD;AAED,eAAe,sBAAsB,CAAA"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Block } from "@mezo-org/mezo-clay";
|
|
2
|
-
import React from "react";
|
|
3
|
-
function DefaultAvatar(props) {
|
|
4
|
-
return (React.createElement("svg", { viewBox: "0 0 214 214", fill: "none", ...props },
|
|
5
|
-
React.createElement("rect", { y: "-0.478027", width: "166.379", height: "81.7091", fill: "#FF004D" }),
|
|
6
|
-
React.createElement("rect", { x: "166", y: "-0.478027", width: "48", height: "82", fill: "black" }),
|
|
7
|
-
React.createElement("rect", { x: "166.379", y: "81.231", width: "24.1044", height: "132.291", fill: "#DFFF80" }),
|
|
8
|
-
React.createElement("rect", { x: "118.758", y: "81.231", width: "24.1044", height: "132.291", fill: "#FF5500" }),
|
|
9
|
-
React.createElement("rect", { x: "71.1372", y: "81.231", width: "24.1044", height: "132.291", fill: "#5A59A7" }),
|
|
10
|
-
React.createElement("rect", { x: "23.5166", y: "81.231", width: "24.1044", height: "132.291", fill: "#47B5FF" }),
|
|
11
|
-
React.createElement("rect", { y: "81.231", width: "23.5165", height: "132.291", fill: "#A3C238" }),
|
|
12
|
-
React.createElement("rect", { x: "190.483", y: "81.231", width: "23.5165", height: "132.291", fill: "#6E6E70" }),
|
|
13
|
-
React.createElement("rect", { x: "142.863", y: "81.231", width: "23.5165", height: "132.291", fill: "#0A3C01" }),
|
|
14
|
-
React.createElement("rect", { x: "95.2417", y: "81.231", width: "23.5165", height: "132.291", fill: "#F2A91F" }),
|
|
15
|
-
React.createElement("rect", { x: "47.6211", y: "81.231", width: "23.5165", height: "132.291", fill: "#6B3D01" })));
|
|
16
|
-
}
|
|
17
|
-
function DefaultAvatarComponent(props) {
|
|
18
|
-
return React.createElement(Block, { as: DefaultAvatar, ...props });
|
|
19
|
-
}
|
|
20
|
-
export default DefaultAvatarComponent;
|
|
21
|
-
//# sourceMappingURL=DefaultAvatar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultAvatar.js","sourceRoot":"","sources":["../../../src/assets/DefaultAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAc,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAmB,MAAM,OAAO,CAAA;AAEvC,SAAS,aAAa,CAAC,KAA8B;IACnD,OAAO,CACL,6BAAK,OAAO,EAAC,aAAa,EAAC,IAAI,EAAC,MAAM,KAAK,KAAK;QAC9C,8BAAM,CAAC,EAAC,WAAW,EAAC,KAAK,EAAC,SAAS,EAAC,MAAM,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS,GAAG;QACtE,8BAAM,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,WAAW,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,GAAG;QAClE,8BACE,CAAC,EAAC,SAAS,EACX,CAAC,EAAC,QAAQ,EACV,KAAK,EAAC,SAAS,EACf,MAAM,EAAC,SAAS,EAChB,IAAI,EAAC,SAAS,GACd;QACF,8BACE,CAAC,EAAC,SAAS,EACX,CAAC,EAAC,QAAQ,EACV,KAAK,EAAC,SAAS,EACf,MAAM,EAAC,SAAS,EAChB,IAAI,EAAC,SAAS,GACd;QACF,8BACE,CAAC,EAAC,SAAS,EACX,CAAC,EAAC,QAAQ,EACV,KAAK,EAAC,SAAS,EACf,MAAM,EAAC,SAAS,EAChB,IAAI,EAAC,SAAS,GACd;QACF,8BACE,CAAC,EAAC,SAAS,EACX,CAAC,EAAC,QAAQ,EACV,KAAK,EAAC,SAAS,EACf,MAAM,EAAC,SAAS,EAChB,IAAI,EAAC,SAAS,GACd;QACF,8BAAM,CAAC,EAAC,QAAQ,EAAC,KAAK,EAAC,SAAS,EAAC,MAAM,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS,GAAG;QACnE,8BACE,CAAC,EAAC,SAAS,EACX,CAAC,EAAC,QAAQ,EACV,KAAK,EAAC,SAAS,EACf,MAAM,EAAC,SAAS,EAChB,IAAI,EAAC,SAAS,GACd;QACF,8BACE,CAAC,EAAC,SAAS,EACX,CAAC,EAAC,QAAQ,EACV,KAAK,EAAC,SAAS,EACf,MAAM,EAAC,SAAS,EAChB,IAAI,EAAC,SAAS,GACd;QACF,8BACE,CAAC,EAAC,SAAS,EACX,CAAC,EAAC,QAAQ,EACV,KAAK,EAAC,SAAS,EACf,MAAM,EAAC,SAAS,EAChB,IAAI,EAAC,SAAS,GACd;QACF,8BACE,CAAC,EAAC,SAAS,EACX,CAAC,EAAC,QAAQ,EACV,KAAK,EAAC,SAAS,EACf,MAAM,EAAC,SAAS,EAChB,IAAI,EAAC,SAAS,GACd,CACE,CACP,CAAA;AACH,CAAC;AAED,SAAS,sBAAsB,CAAC,KAAiB;IAC/C,OAAO,oBAAC,KAAK,IAAC,EAAE,EAAE,aAAa,KAAM,KAAK,GAAI,CAAA;AAChD,CAAC;AAED,eAAe,sBAAsB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EditIcon.d.ts","sourceRoot":"","sources":["../../../src/assets/EditIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAA0B,MAAM,OAAO,CAAA;AA2B9C,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,yBAAyB,CACtD,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,CACE,CAAA;AAElD,eAAe,iBAAiB,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Icon } from "@mezo-org/mezo-clay";
|
|
2
|
-
import React, { forwardRef } from "react";
|
|
3
|
-
function EditIcon(props, ref) {
|
|
4
|
-
const { title, size = 16, color = "black", ...restProps } = props;
|
|
5
|
-
return (React.createElement(Icon, { ref: ref, viewBox: "0 0 24 24", title: title ?? "Edit", size: size, color: color, role: "graphics-symbol", ...restProps },
|
|
6
|
-
React.createElement("path", { d: "M18 10L21 7L17 3L14 6M18 10L8 20H4V16L14 6M18 10L14 6", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", fill: "none" })));
|
|
7
|
-
}
|
|
8
|
-
const ForwardedEditIcon = forwardRef(EditIcon);
|
|
9
|
-
export default ForwardedEditIcon;
|
|
10
|
-
//# sourceMappingURL=EditIcon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EditIcon.js","sourceRoot":"","sources":["../../../src/assets/EditIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAa,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAAK,EAAE,EAAE,UAAU,EAAO,MAAM,OAAO,CAAA;AAE9C,SAAS,QAAQ,CAAC,KAAgB,EAAE,GAAuB;IACzD,MAAM,EAAE,KAAK,EAAE,IAAI,GAAG,EAAE,EAAE,KAAK,GAAG,OAAO,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAA;IAEjE,OAAO,CACL,oBAAC,IAAI,IACH,GAAG,EAAE,GAAG,EACR,OAAO,EAAC,WAAW,EACnB,KAAK,EAAE,KAAK,IAAI,MAAM,EACtB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,iBAAiB,KAClB,SAAS;QAEb,8BACE,CAAC,EAAC,uDAAuD,EACzD,MAAM,EAAE,KAAK,EACb,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,IAAI,EAAC,MAAM,GACX,CACG,CACR,CAAA;AACH,CAAC;AAED,MAAM,iBAAiB,GAEnB,UAAU,CAA2B,QAAQ,CAAC,CAAA;AAElD,eAAe,iBAAiB,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ButtonProps } from "@mezo-org/mezo-clay";
|
|
2
|
-
import React, { ReactNode } from "react";
|
|
3
|
-
declare const ConnectedTrigger: React.ForwardRefExoticComponent<Omit<ButtonProps, "size" | "children"> & {
|
|
4
|
-
avatar: ReactNode;
|
|
5
|
-
size?: "medium" | "large";
|
|
6
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
-
export default ConnectedTrigger;
|
|
8
|
-
//# sourceMappingURL=ConnectedTrigger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectedTrigger.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/ConnectedTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,WAAW,EAAgB,MAAM,qBAAqB,CAAA;AAC9E,OAAO,KAAK,EAAE,EAAc,SAAS,EAAW,MAAM,OAAO,CAAA;AAO7D,QAAA,MAAM,gBAAgB;YAJZ,SAAS;WACV,QAAQ,GAAG,OAAO;2CAoE1B,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Block, Button, useStyletron } from "@mezo-org/mezo-clay";
|
|
2
|
-
import React, { forwardRef, useMemo } from "react";
|
|
3
|
-
const ConnectedTrigger = forwardRef((props, ref) => {
|
|
4
|
-
const { onClick, avatar, size = "medium", ...restProps } = props;
|
|
5
|
-
const [, theme] = useStyletron();
|
|
6
|
-
const avatarSize = useMemo(() => {
|
|
7
|
-
const sizeMap = {
|
|
8
|
-
medium: theme.sizing.scale950,
|
|
9
|
-
large: theme.sizing.scale1400,
|
|
10
|
-
};
|
|
11
|
-
return sizeMap[size];
|
|
12
|
-
}, [theme, size]);
|
|
13
|
-
const buttonPadding = useMemo(() => {
|
|
14
|
-
const paddingMap = {
|
|
15
|
-
medium: theme.sizing.scale0,
|
|
16
|
-
large: theme.sizing.scale100,
|
|
17
|
-
};
|
|
18
|
-
return paddingMap[size];
|
|
19
|
-
}, [theme, size]);
|
|
20
|
-
return (React.createElement(Button, { overrides: {
|
|
21
|
-
BaseButton: {
|
|
22
|
-
props: { ref, ...restProps },
|
|
23
|
-
style: {
|
|
24
|
-
borderRadius: "100%",
|
|
25
|
-
overflow: "hidden",
|
|
26
|
-
padding: buttonPadding,
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
}, onClick: onClick }, typeof avatar === "string" ? (React.createElement(Block, { width: avatarSize, height: avatarSize, as: "img", src: avatar, alt: "" })) : (React.createElement(Block, { width: avatarSize, height: avatarSize, overrides: {
|
|
30
|
-
Block: {
|
|
31
|
-
style: {
|
|
32
|
-
borderRadius: "100%",
|
|
33
|
-
overflow: "hidden",
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
} }, avatar))));
|
|
37
|
-
});
|
|
38
|
-
export default ConnectedTrigger;
|
|
39
|
-
//# sourceMappingURL=ConnectedTrigger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectedTrigger.js","sourceRoot":"","sources":["../../../../src/components/Dropdown/ConnectedTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAe,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAC9E,OAAO,KAAK,EAAE,EAAE,UAAU,EAAa,OAAO,EAAE,MAAM,OAAO,CAAA;AAO7D,MAAM,gBAAgB,GAAG,UAAU,CACjC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACb,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAG,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAA;IAEhE,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG,YAAY,EAAE,CAAA;IAEhC,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE;QAC9B,MAAM,OAAO,GAAG;YACd,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,QA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|
-
{"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/Content.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAOxC,KAAK,YAAY,GAAG;IAClB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC,CAAA;AAED,iBAAS,OAAO,CAAC,KAAK,EAAE,YAAY,qBAwCnC;AAED,eAAe,OAAO,CAAA"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Block, useStyletron } from "@mezo-org/mezo-clay";
|
|
2
|
-
import React, { useEffect } from "react";
|
|
3
|
-
import useDropdownStore, { DropdownView } from "../../stores/dropdownStore";
|
|
4
|
-
import Root from "./Root/Root";
|
|
5
|
-
import Receive from "./Receive/Receive";
|
|
6
|
-
import Settings from "./Settings/Settings";
|
|
7
|
-
import TestnetTopBanner from "./TestnetTopBanner";
|
|
8
|
-
function Content(props) {
|
|
9
|
-
const { onSignOut, onOtherAssetsClick } = props;
|
|
10
|
-
const [_, theme] = useStyletron();
|
|
11
|
-
const currentView = useDropdownStore((state) => state.view);
|
|
12
|
-
const setView = useDropdownStore((state) => state.setView);
|
|
13
|
-
useEffect(() => () => {
|
|
14
|
-
setView(DropdownView.ROOT);
|
|
15
|
-
}, [setView]);
|
|
16
|
-
return (React.createElement(Block, { display: "inline-flex", flexDirection: "column", backgroundColor: theme.colors.backgroundPrimary, width: "100%", overrides: {
|
|
17
|
-
Block: {
|
|
18
|
-
style: {
|
|
19
|
-
boxSizing: "border-box",
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
} },
|
|
23
|
-
React.createElement(TestnetTopBanner, null),
|
|
24
|
-
currentView === DropdownView.ROOT && (React.createElement(Root, { onSignOut: onSignOut, onOtherAssetsClick: onOtherAssetsClick })),
|
|
25
|
-
currentView === DropdownView.RECEIVE && React.createElement(Receive, null),
|
|
26
|
-
currentView === DropdownView.SETTINGS && React.createElement(Settings, null)));
|
|
27
|
-
}
|
|
28
|
-
export default Content;
|
|
29
|
-
//# sourceMappingURL=Content.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../../src/components/Dropdown/Content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,gBAAgB,EAAE,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC3E,OAAO,IAAI,MAAM,aAAa,CAAA;AAC9B,OAAO,OAAO,MAAM,mBAAmB,CAAA;AACvC,OAAO,QAAQ,MAAM,qBAAqB,CAAA;AAC1C,OAAO,gBAAgB,MAAM,oBAAoB,CAAA;AAOjD,SAAS,OAAO,CAAC,KAAmB;IAClC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,KAAK,CAAA;IAE/C,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,YAAY,EAAE,CAAA;IAEjC,MAAM,WAAW,GAAG,gBAAgB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAC3D,MAAM,OAAO,GAAG,gBAAgB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IAE1D,SAAS,CACP,GAAG,EAAE,CAAC,GAAG,EAAE;QACT,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;IAC5B,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAA;IAED,OAAO,CACL,oBAAC,KAAK,IACJ,OAAO,EAAC,aAAa,EACrB,aAAa,EAAC,QAAQ,EACtB,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,iBAAiB,EAC/C,KAAK,EAAC,MAAM,EACZ,SAAS,EAAE;YACT,KAAK,EAAE;gBACL,KAAK,EAAE;oBACL,SAAS,EAAE,YAAY;iBACxB;aACF;SACF;QAED,oBAAC,gBAAgB,OAAG;QAEnB,WAAW,KAAK,YAAY,CAAC,IAAI,IAAI,CACpC,oBAAC,IAAI,IAAC,SAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,kBAAkB,GAAI,CACvE;QAEA,WAAW,KAAK,YAAY,CAAC,OAAO,IAAI,oBAAC,OAAO,OAAG;QAEnD,WAAW,KAAK,YAAY,CAAC,QAAQ,IAAI,oBAAC,QAAQ,OAAG,CAChD,CACT,CAAA;AACH,CAAC;AAED,eAAe,OAAO,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ButtonProps } from "@mezo-org/mezo-clay";
|
|
2
|
-
import React from "react";
|
|
3
|
-
declare const DisconnectedTrigger: React.ForwardRefExoticComponent<Omit<ButtonProps, "children"> & {
|
|
4
|
-
children: string;
|
|
5
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
-
export default DisconnectedTrigger;
|
|
7
|
-
//# sourceMappingURL=DisconnectedTrigger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DisconnectedTrigger.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/DisconnectedTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,WAAW,EAAyB,MAAM,qBAAqB,CAAA;AAChF,OAAO,KAAqB,MAAM,OAAO,CAAA;AAMzC,QAAA,MAAM,mBAAmB;cAHb,MAAM;2CA6BhB,CAAA;AAEF,eAAe,mBAAmB,CAAA"}
|