Skip to content

Commit

Permalink
Merge pull request #158 from P4-Games/release/v0.0.8
Browse files Browse the repository at this point in the history
merge release/v0.0.8 into develop
  • Loading branch information
dappsar authored Dec 29, 2024
2 parents 4955b02 + c95d3ca commit a746b73
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 30 deletions.
19 changes: 0 additions & 19 deletions src/app/api/_hooks/use-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,6 @@ export function useGetWalletNotifications(
})
}

/*
export function useGetWalletNotifications(walletId: string) {
const { data, error, isLoading, isValidating, mutate } = useSWR(
endpoints.dashboard.wallet.notifications(walletId),
fetcher
)
return {
data,
isLoading,
error,
isValidating,
mutate // Include mutate for manual refresh
}
// return useGetCommon(endpoints.dashboard.wallet.notifications(walletId))
}
*/

// ----------------------------------------------------------------------

export async function transferAll(userId: string, data: { walletTo: string }) {
Expand Down
1 change: 1 addition & 0 deletions src/app/api/v1/auth/login/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export async function POST(req: NextRequest) {
id: user.id,
displayName: user.name || user.phone_number,
wallet: user.wallet || '',
walletEOA: user.walletEOA || '',
email: user.email || '',
photoURL: user.photo || '/assets/images/avatars/generic-user.jpg',
phoneNumber: user.phone_number || ''
Expand Down
1 change: 1 addition & 0 deletions src/app/api/v1/user/[id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export async function GET(request: Request, { params }: { params: IParams }) {
id: user.id,
displayName: user.name,
wallet: user.wallet,
walletEOA: user.walletEOA || '',
email: user.email || '',
photoURL: user.photo,
phoneNumber: user.phone_number
Expand Down
2 changes: 0 additions & 2 deletions src/app/api/v1/wallet/[id]/notifications/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ type IParams = {
// ----------------------------------------------------------------------

export async function GET(request: Request, { params }: { params: IParams }) {
console.log('get notificacions called')

if (!params.id) {
const errorMessage: IErrorResponse = {
error: {
Expand Down
2 changes: 1 addition & 1 deletion src/config-global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const RECAPTCHA_SITE_KEY = process.env.NEXT_PUBLIC_RECAPTCHA_SITE_KEY ||
export const EXPLORER_L1_URL: string =
process.env.NEXT_PUBLIC_EXPLORER_L1_URL || 'https://sepolia.etherscan.io'
export const EXPLORER_L2_URL: string =
process.env.NEXT_PUBLIC_EXPLORER_L2_URL || 'https://sepolia.arbiscan.io/'
process.env.NEXT_PUBLIC_EXPLORER_L2_URL || 'https://sepolia.arbiscan.io'
export const EXPLORER_NFT_URL: string =
process.env.NEXT_PUBLIC_EXPLORER_NFT_URL || 'https://sepolia.arbiscan.io'
export const NFT_IMAGE_REPOSITORY = (
Expand Down
3 changes: 2 additions & 1 deletion src/sections/account/account-general.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ export default function AccountGeneral() {
email: user!.email,
phone_number: user!.phoneNumber,
photo: user!.photoURL,
wallet: user!.wallet
wallet: user!.wallet,
walletEOA: user!.walletEOA
}
await updateContact(user!.id, userData)

Expand Down
2 changes: 1 addition & 1 deletion src/sections/banking/banking-balances.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { useResponsive } from 'src/hooks/use-responsive'
import { fNumber } from 'src/utils/format-number'

import { useTranslate } from 'src/locales'
import { EXPLORER_L1_URL, EXPLORER_L2_URL, BOT_WAPP_URL } from 'src/config-global'
import { BOT_WAPP_URL, EXPLORER_L1_URL, EXPLORER_L2_URL } from 'src/config-global'

import Iconify from 'src/components/iconify'

Expand Down
5 changes: 2 additions & 3 deletions src/sections/nfts/nft-item-share.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,14 @@ export default function NftItemShare({ nftId, nftData }: NftItemClaimProps) {

<m.div variants={varFade().inUp}>
<Button size='large' color='inherit' variant='contained' onClick={handleTriggerShare}>
<Icon icon='ri:share-fill' width={20} style={{ marginRight: 8 }} />{' '}
{t('nfts.share.cta')}
<Icon icon='ri:share-fill' width={20} style={{ marginRight: 8 }} /> {t('common.share')}
</Button>
</m.div>
</Box>

{/* Diálogo de compartir */}
<Dialog open={openShare} onClose={handleTriggerShare} maxWidth='xs' fullWidth>
<DialogTitle>{t('nfts.share.cta')}</DialogTitle>
<DialogTitle>{t('common.share')}</DialogTitle>
<DialogContent>
<Box
sx={{
Expand Down
7 changes: 4 additions & 3 deletions src/sections/notifications/push-notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ const PushNotifications: React.FC = () => {
const [walletAddress, setWalletAddress] = useState<string | null>(null)

useEffect(() => {
if (user && user.wallet) {
setWalletAddress(user.wallet)
// User is subscribed to the Push channel using his EOA wallet!"
if (user && user.walletEOA) {
setWalletAddress(user.walletEOA)
}
}, [user])

const { data, isLoading }: { data: any; isLoading: boolean } = useGetWalletNotifications(
walletAddress || user?.wallet,
walletAddress || user?.walletEAO,
5,
notificationsRefreshInterval
)
Expand Down
1 change: 1 addition & 0 deletions src/types/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ export type IAccount = {
phone_number: string
photo: string
wallet: string
walletEOA: string
code?: string
}

0 comments on commit a746b73

Please sign in to comment.