Skip to content

Commit

Permalink
πŸ› Fix missing stripe email (#176)
Browse files Browse the repository at this point in the history
* πŸ› Fix missing stripe email

* 🎨 Update import path
  • Loading branch information
AuroraHuang22 authored Aug 15, 2024
1 parent 6415c4e commit e82cb0b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions stores/stripe.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
import { defineStore } from 'pinia'
import { defineStore, storeToRefs } from 'pinia'
import { LIKE_CO_API } from '~/constant'
import { useBookStoreApiStore } from '~/stores/book-store-api'

export const useStripeStore = defineStore('stripe-connect', () => {
const bookStoreApiStore = useBookStoreApiStore()
const { token } = storeToRefs(bookStoreApiStore)

const stripeConnectStatusWalletMap = ref({} as Record<string, any>)

async function fetchStripeConnectStatus (wallet: string) {
stripeConnectStatusWalletMap.value[wallet] = { isReady: false }
const { data, error } = await useFetch(
`${LIKE_CO_API}/likernft/book/user/connect/status?wallet=${wallet}`
const { data, error } = await useFetch(`${LIKE_CO_API}/likernft/book/user/connect/status?wallet=${wallet}`,
{
headers: {
authorization: `Bearer ${token.value}`
}
}
)
stripeConnectStatusWalletMap.value[wallet] = (data?.value as any) || {}
if (error.value) {
Expand Down

0 comments on commit e82cb0b

Please sign in to comment.