-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove Age of Chronos promotion (#1386) * Fetch block time from chain (#1384) * Fetch block time to store * Apr calculation fix * Type fix * PR comments fix and code cleanup * Fix/selected dapp index (#1387) * Voting wizard search bug fix * Keep selected dApps while switching categories * APR calculation fix to use block time for a given block (#1389) * APR calculation fix to use block time for a given block * Small fix
- Loading branch information
Showing
19 changed files
with
120 additions
and
74 deletions.
There are no files selected for viewing
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { computed } from 'vue'; | ||
import { useStore } from 'src/store'; | ||
import { container } from 'src/v2/common'; | ||
import { ISystemRepository } from 'src/v2/repositories'; | ||
import { Symbols } from 'src/v2/symbols'; | ||
|
||
export function useBlockTime() { | ||
const store = useStore(); | ||
const blockTimeInSeconds = computed<number | undefined>( | ||
() => store.getters['general/getBlockTimeInSeconds'] | ||
); | ||
|
||
const fetchBlockTimeToStore = async () => { | ||
const systemRepository = container.get<ISystemRepository>(Symbols.SystemRepository); | ||
const blockTime = await systemRepository.getBlockTimeInSeconds(); | ||
store.commit('general/setBlockTime', blockTime); | ||
}; | ||
|
||
return { blockTimeInSeconds, fetchBlockTimeToStore }; | ||
} |
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
Oops, something went wrong.