Fix syncing status and change api for scrt.network
This commit is contained in:
parent
2d111e9d8a
commit
91101648fc
@ -145,7 +145,8 @@ export function toDuration(value) {
|
||||
|
||||
// unit(y M d h m s ms)
|
||||
export function timeIn(time, amount, unit = 's') {
|
||||
return dayjs().isAfter(dayjs(time).add(amount, unit))
|
||||
const input = dayjs(time).add(amount, unit)
|
||||
return dayjs().unix() > input.unix()
|
||||
}
|
||||
|
||||
export function toDay(time, format = 'long') {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"chain_name": "secret",
|
||||
"api": "https://beta-api.scrt.network",
|
||||
"api": "https://api.scrt.network",
|
||||
"sdk_version": "0.33.8",
|
||||
"addr_prefix": "secret",
|
||||
"logo": "https://dl.airtable.com/.attachments/b95ce1905e5327924ffdcb6d57c55b66/7e2ad353/logo.png"
|
||||
|
@ -165,7 +165,7 @@ export default {
|
||||
const { header } = b.block
|
||||
this.$set(chain, 'height', header.height)
|
||||
this.$set(chain, 'time', toDay(header.time))
|
||||
this.$set(chain, 'variant', timeIn(header, 1, 'm') ? 'danger' : 'success')
|
||||
this.$set(chain, 'variant', timeIn(header.time, 3, 'm') ? 'danger' : 'success')
|
||||
})
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user