Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 bsx/snek offers composition api #6633

Merged
merged 6 commits into from
Aug 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
➖ unused
  • Loading branch information
roiLeo committed Aug 9, 2023
commit b21bdf259ad69c6b8f71bf83c4b3c2caaf2bef33
17 changes: 5 additions & 12 deletions components/bsx/Offer/MyOffer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,11 @@ const fetchMyOffers = async () => {

watchEffect(async () => await fetchMyOffers())

const emit = defineEmits(['offersIncoming'])
const offersIncoming = (response: OfferResponse) => {
emit('offersIncoming', (offers.value = response.offers))
}
// doesn't need emit?
// const emit = defineEmits(['offersIncoming'])
// const offersIncoming = (response: OfferResponse) => {
// emit('offersIncoming', (offers.value = response.offers))
// }

const submit = async (
maker: string,
Expand Down Expand Up @@ -237,14 +238,6 @@ const calcExpirationTime = (expirationBlock: number): string => {
return formatSecondsToDuration(calcSecondsToBlock(expirationBlock))
}

const calcExpirationDate = (expirationBlock: number): string => {
return endDate(calcSecondsToBlock(expirationBlock))
}

const isExpired = (expirationBlock: number): boolean => {
return currentBlock.value >= expirationBlock
}

watch(accountId, () => {
fetchMyOffers()
})
Expand Down