-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: refactor imports to use hooks directory and enhance network man…
…agement
- Loading branch information
Showing
17 changed files
with
141 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,12 @@ | |
href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Caveat:[email protected]&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<title>Massa Tips</title> | ||
</head> | ||
<body> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
export const schedulerAddress = | ||
// buildnet | ||
'AS1FmYN5nqeUzNycSZFBYdcno4tFCgNfPfMwhPCxCZLgFJy4YMUp'; | ||
//mainnet | ||
//'AS1WHog6myEJg1qydeopye6VSaC4yKKhZEjPhEGAgWYMPNLsKfLf'; | ||
export const schedulerAddress = { | ||
buildnet: 'AS1FmYN5nqeUzNycSZFBYdcno4tFCgNfPfMwhPCxCZLgFJy4YMUp', | ||
mainnet: 'AS1WHog6myEJg1qydeopye6VSaC4yKKhZEjPhEGAgWYMPNLsKfLf', | ||
}; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
|
||
import { create } from 'zustand'; | ||
|
||
type AvailableNetwork = 'mainnet' | 'buildnet'; | ||
|
||
export interface NetworkStoreState { | ||
network: AvailableNetwork; | ||
isMainnet: boolean; | ||
setNetwork: (network: AvailableNetwork) => void; | ||
toggleNetwork: () => void; | ||
} | ||
|
||
export const useNetworkStore = create<NetworkStoreState>((set) => ({ | ||
network: 'buildnet', | ||
isMainnet: false, | ||
|
||
setNetwork: (network: AvailableNetwork) => { | ||
set({ network, isMainnet: network === 'mainnet' }); | ||
}, | ||
|
||
toggleNetwork: () => { | ||
set((state) => ({ | ||
network: state.network === 'mainnet' ? 'buildnet' : 'mainnet', | ||
isMainnet: !state.isMainnet, | ||
})); | ||
}, | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters