Skip to content

Commit

Permalink
Merge pull request #302 from P4-Games/feature/burn-cards-1
Browse files Browse the repository at this point in the history
Albums de quema
  • Loading branch information
dappsar authored Jan 1, 2024
2 parents b889cfe + f96a151 commit 8e2b4f8
Show file tree
Hide file tree
Showing 45 changed files with 2,009 additions and 413 deletions.
65 changes: 49 additions & 16 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,11 @@
"dependencies": {
"@next/eslint-plugin-next": "^14.0.1",
"@nomicfoundation/hardhat-toolbox": "^2.0.0",
"@openzeppelin/contracts": "^4.8.0",
"@walletconnect/web3-provider": "^1.8.0",
"@web3modal/ethers5": "^3.5.1",
"axios": "^1.6.2",
"book-flip": "^1.0.0",
"dotenv": "^16.3.1",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"ethers": "^5.7.2",
"framer-motion": "^9.0.2",
"gsap": "^3.11.4",
Expand Down Expand Up @@ -66,7 +63,10 @@
"@commitlint/config-conventional": "^18.4.3",
"eslint-config-next": "^14.0.1",
"file-loader": "^6.2.0",
"pre-commit": "^1.2.2"
"pre-commit": "^1.2.2",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0"

},
"cacheDirectories": [
".next/cache"
Expand Down
Binary file added public/images/footer/cancel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/footer/check-mark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/footer/selectAll.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/footer/undo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added public/images/gamma/AlbumGammaToBurn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added public/images/gamma/GammaFondoToBurn-libreta.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/gamma/GammaFondoToBurn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/gamma/TrashFire-disabled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/gamma/TrashFire.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Binary file added public/images/gamma/selectAllOff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/gamma/selectAllOn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/gamma/undoOff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/gamma/undoOn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 35 additions & 1 deletion public/locales/br/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
"finish_album_success": "Parabéns! Você completou o álbum. Você receberá seu prêmio em DAIs na sua carteira.",
"finish_album_no_qtty": "Você ainda não tem o álbum completo para reivindicar o prêmio",
"finish_album_no_album": "Você ainda não tem um álbum para reivindicar o prêmio.",
"finish_album_no_album_60": "Você ainda não tem um álbum para gravar cartões.",
"finish_album_warning": "As condições necessárias para completar os álbuns e reivindicar os prêmios ainda não estão disponíveis. Tente novamente em alguns dias!",

"publish_offer_error": "Ocorreu um erro ao tentar publicar",
Expand Down Expand Up @@ -179,12 +180,45 @@
"notification_album_transfer": "Você recebeu un álbum de {WALLET}.",
"notification_burn_album_transfer": "Você recebeu un álbum de queima de {WALLET}.",
"notification_exchange": "Você recebeu o cartão {CARD_RECEIVED} de {WALLET} em troca do cartão {CARD_SENT}.",
"notification_cards_burned": "Você queimou {CARDS_BURNED} cartões",
"notification_album_120_completed": "Você completou o álbum principal! Você receberá um prêmio em sua carteira.",
"notification_album_60_completed": "Ao queimar cartões, você completou a gravação do álbum. Você receberá um prêmio em sua carteira.",
"notification_ticket_reception": "Você recebeu um ticket ({TICKET_ID}) para completar a gravação do álbum.",

"offline_msg": "Site atualmente offline ou sem conexão com a Internet disponível",
"offline_action": "Ir para casa",

"exhange_cards_to_send": "você enviará",
"exhange_cards_to_receive": "você receberá",
"exchange_cards_leyend": "A seguir você pode escolher um cartão entre aqueles que o dono desta carteira deseja, para prosseguir com a troca."
"exchange_cards_leyend": "A seguir você pode escolher um cartão entre aqueles que o dono desta carteira deseja, para prosseguir com a troca.",

"burn_cards": "Gravar Cartões",
"burn_title": "Cartas queimadas",
"burn_text": "Você vai queimar {CARDS_TO_BURN} cartas. Você confirma?",
"burn_no_cards_selected": "Não há cartas selecionadas para queimar.",
"burn_error": "Ocorreu um erro ao tentar gravar",

"burn_undo_all_info": "Não há cartas selecionadas para gravação que possam ser removidas da gravação.",
"burn_undo_all_title": "Desfazer seleção",
"burn_undo_all_text": "Todos os cards selecionados para gravação ({CARDS_TO_BURN}) serão restaurados. Deseja continuar?",
"burn_undo_all_button_confirm": "Sim, desfazer seleção",
"burn_undo_all_confirm": "Cartões restaurados",
"burn_undo_all_error": "Ocorreu um erro ao tentar restaurar os cartões da gravação",

"burn_cancel_title": "Cancelamento de gravação",
"burn_cancel_text": "Deseja cancelar a gravação? (a seleção de cartas para gravar será perdida).",
"burn_cancel_button_confirm": "Sim, cancelar gravação",
"burn_cancel_button_cancel": "Manter seleção",

"burn_repeated_info": "Você não tem cartas repetidas para queimar.",
"burn_repeated_info_less": "Você precisa de no mínimo 60 cartas repetidas para queimar.",
"burn_select_cart_offered": "Você não pode queimar mais cópias deste cartão, pois há uma oferta associada a ele.",
"burn_confirm_minimal": "Você deve selecionar 60 cartões para prosseguir com a gravação.",
"burn_select_all_info": "Todas as cartas repetidas agora estão selecionadas.",
"burn_select_all_info_60": "Você pode queimar no máximo 60 cartas por vez.",
"burn_select_all_confirm": "Todos os cartões repetidos foram selecionados (até um máximo de 60).",

"confirm": "Confirmar",
"cancel": "Cancelar"

}
38 changes: 36 additions & 2 deletions public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
"finish_album_success": "Congratulations! You completed the album. You will receive your prize in DAIs to your wallet.",
"finish_album_no_qtty": "You do not have the complete album yet to claim the prize",
"finish_album_no_album": "You do not have an album yet to claim the prize.",
"finish_album_no_album_60": "You do not have an album yet to burn cards.",
"finish_album_warning": " The conditions required to complete the albums and claim the prizes are not yet met. Please try again in a few days!",

"publish_offer_error": "There was an error trying to publish",
Expand Down Expand Up @@ -179,11 +180,44 @@
"notification_album_transfer": "You have received an album from {WALLET}.",
"notification_burn_album_transfer": "You have received a burnt album from {WALLET}.",
"notification_exchange": "You received the card {CARD_RECEIVED} from {WALLET} in exchange for the card {CARD_SENT}.",

"notification_cards_burned": "You burned {CARDS_BURNED} cards",
"notification_album_120_completed": "You completed the main album! You will receive a prize in your wallet.",
"notification_album_60_completed": "By burning cards, you completed the burning album. You will receive a prize in your wallet.",
"notification_ticket_reception": "You received a ticket ({TICKET_ID}) for completing the burn album.",

"offline_msg": "Website currently offline or no Internet connection available",
"offline_action": "Go to Home",

"exhange_cards_to_send": "you will send",
"exhange_cards_to_receive": "you will receive",
"exchange_cards_leyend": "Next you can choose a card among those that the owner of this wallet wants, to proceed with the exchange."
"exchange_cards_leyend": "Next you can choose a card among those that the owner of this wallet wants, to proceed with the exchange.",

"burn_cards": "Burn Cards",
"burn_title": "Burning cards",
"burn_text": "You are going to burn {CARDS_TO_BURN} cards. Do you confirm?",
"burn_no_cards_selected": "There are no cards selected to burn.",
"burn_error": "There was an error attempting to burn",

"burn_undo_all_info": "There are no cards selected for burning, which can be removed from the burn.",
"burn_undo_all_title": "Undo selection",
"burn_undo_all_text": "All cards selected for burning ({CARDS_TO_BURN}) will be restored. Do you want to continue?",
"burn_undo_all_button_confirm": "Yes, undo selection",
"burn_undo_all_confirm": "Cards restored",
"burn_undo_all_error": "There was an error trying to restore cards from burning",

"burn_cancel_title": "Burn Cancellation",
"burn_cancel_text": "Do you want to cancel the burning? (the selection of cards to burn will be lost).",
"burn_cancel_button_confirm": "Yes, cancel burning",
"burn_cancel_button_cancel": "Keep selection",

"burn_repeated_info": "You have no repeated cards to burn.",
"burn_repeated_info_less": "You need a minimum of 60 repeated cards to burn.",
"burn_select_cart_offered": "You cannot burn any more copies of this card, since it has an offer associated with it.",
"burn_confirm_minimal": "You have to select 60 cards to proceed with burning.",
"burn_select_all_info": "All repeated cards are already selected.",
"burn_select_all_info_60": "You can burn a maximum of 60 cards at a time.",
"burn_select_all_confirm": "All repeat cards have been selected (up to a maximum of 60).",

"confirm": "Confirm",
"cancel": "Cancel"
}
37 changes: 35 additions & 2 deletions public/locales/es/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
"finish_album_success": "Felicitaciones! Completaste el álbum. Recibirás en tu wallet tu premio en DAIs.",
"finish_album_no_qtty": "Aún no tienes el album completo para poder reclamar el premio.",
"finish_album_no_album": "Aún no tienes un álbum para poder reclamar el premio.",
"finish_album_no_album_60": "Aún no tienes un álbum para poder quemar cartas.",
"finish_album_warning": "Aún no están dadas las condiciones para que se puedan completar los álbumnes y reclamas los premios. Intenta en unos días!.",

"publish_offer_error": "Ocurrió un error al intentar realizar la publicación.",
Expand Down Expand Up @@ -180,12 +181,44 @@
"notification_album_transfer": "Recibiste un álbum de {WALLET}.",
"notification_burn_album_transfer": "Recibiste un álbum de quema de {WALLET}.",
"notification_exchange": "Recibiste la carta {CARD_RECEIVED} de {WALLET} a cambio de la carta {CARD_SENT}.",
"notification_cards_burned": "Quemaste {CARDS_BURNED} cartas",
"notification_album_120_completed": "Completaste el álbum principal!. Recibirás un premio en tu wallet.",
"notification_album_60_completed": "Con la quema de cartas, completaste el álbum de quema!. Recibirás un premio en tu wallet.",
"notification_ticket_reception": "Recibiste un ticket ({TICKET_ID}) por completar el álbum de quema.",

"offline_msg": "Sitio web actualmente sin conexión o sin conexión a Internet disponible",
"offline_action": "Ir a Inicio",

"exhange_cards_to_send": "enviarás",
"exhange_cards_to_receive": "recibirás",
"exchange_cards_leyend": "A continuación puedes elegir una carta entre las que desea el dueño de ésta wallet, para proceder con el intercambio."

"exchange_cards_leyend": "A continuación puedes elegir una carta entre las que desea el dueño de ésta wallet, para proceder con el intercambio.",

"burn_cards": "Quemar Cartas",
"burn_title": "Quema de cartas",
"burn_text": "Vas a quemar {CARDS_TO_BURN} cartas. ¿Confirmas?",
"burn_no_cards_selected": "No hay cartas seleccionadas para quemar.",
"burn_error": "Hubo un error al intentar la quema",

"burn_undo_all_info": "No hay cartas seleccionadas para quemar, las cuales se puedan quitar de la quema.",
"burn_undo_all_title": "Deshacer selección",
"burn_undo_all_text": "Todas las cartas seleccionadas para la quema ({CARDS_TO_BURN}), se restaurarán. ¿Deseas continuar?",
"burn_undo_all_button_confirm": "Si, deshacer selección",
"burn_undo_all_confirm": "Cartas restauradas",
"burn_undo_all_error": "Hubo un error al intentar restaurar las cartas de la quema",

"burn_cancel_title": "Cancelación de quema",
"burn_cancel_text": "¿Deseas cancelar la quema? (se perderá la selección de cartas a quemar).",
"burn_cancel_button_confirm": "Si, cancelar quema",
"burn_cancel_button_cancel": "Mantener selección",

"burn_repeated_info": "No tienes cartas repetidas para quemar.",
"burn_repeated_info_less": "Necesitas un mínimo de 60 cartas repetidas para quemar.",
"burn_select_cart_offered": "No puedes quemar más copias de ésta carta, dado que tiene una oferta asociada.",
"burn_confirm_minimal": "Tienes que seleccionar 60 cartas para proceder con la quema.",
"burn_select_all_info": "Ya están seleccionadas todas las cartas repetidas.",
"burn_select_all_info_60": "Se puede quemar un máximo de 60 cartas por vez.",
"burn_select_all_confirm": "Se seleccionaron todas las cartas repetidas (hasta un máximo de 60).",

"confirm": "Confirmar",
"cancel": "Cancelar"
}
16 changes: 12 additions & 4 deletions src/components/Footer/FooterButtons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ function FooterButtons() {
onClick={() => {
buttonFunctions[0]()
}}
className={footerButtonsClasses[0] ?? 'footer__buttons__bluebtn_custom'}
className={
(footerButtonsClasses && footerButtonsClasses[0]) ?? 'footer__buttons__bluebtn_custom'
}
>
<></>
</div>
Expand All @@ -52,7 +54,9 @@ function FooterButtons() {
onClick={() => {
buttonFunctions[1]()
}}
className={footerButtonsClasses[1] ?? 'footer__buttons__greenbtn_custom'}
className={
(footerButtonsClasses && footerButtonsClasses[1]) ?? 'footer__buttons__greenbtn_custom'
}
>
<></>
</div>
Expand All @@ -62,7 +66,9 @@ function FooterButtons() {
onClick={() => {
buttonFunctions[2]()
}}
className={footerButtonsClasses[2] ?? 'footer__buttons__redbtn_custom'}
className={
(footerButtonsClasses && footerButtonsClasses[2]) ?? 'footer__buttons__redbtn_custom'
}
>
<></>
</div>
Expand All @@ -72,7 +78,9 @@ function FooterButtons() {
onClick={() => {
buttonFunctions[3]()
}}
className={footerButtonsClasses[3] ?? 'footer__buttons__yellowbtn_custom'}
className={
(footerButtonsClasses && footerButtonsClasses[3]) ?? 'footer__buttons__yellowbtn_custom'
}
>
<></>
</div>
Expand Down
12 changes: 6 additions & 6 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ export const WalletConnectProjectId =
export const CONTRACTS = {
daiAddress: process.env.NEXT_PUBLIC_DAI_ADDRESS || '0xEa4c35c858E15Cef77821278A88435dE57bc8707',
alphaAddress:
process.env.NEXT_PUBLIC_ALPHA_ADDRESS || '0x210e3999B0dcD11aFe155ef915aE916d0A3418cc',
process.env.NEXT_PUBLIC_ALPHA_ADDRESS || '0x7C201e88e43b5FBEEfB77F966c2a5D2E09178B49',
gammaCardsAddress:
process.env.NEXT_PUBLIC_GAMMA_CARDS_ADDRESS || '0x82fd55a375a0154101fde3F81feC5B611f636454',
process.env.NEXT_PUBLIC_GAMMA_CARDS_ADDRESS || '0x34658c07F05638E12793d0961595cBc72fA69452',
gammaPackAddress:
process.env.NEXT_PUBLIC_GAMMA_PACKS_ADDRESS || '0x78D09B1e3Eb64AF5468fDa8515C060f0B36E5B27',
process.env.NEXT_PUBLIC_GAMMA_PACKS_ADDRESS || '0xDc06FbD70b2159863d079aE282d69AEe8a88A18E',
gammaOffersAddress:
process.env.NEXT_PUBLIC_GAMMA_OFFERS_ADDRESS || '0x885F2a39477e87A9379E5980a0319eBC80adC4Bd',
process.env.NEXT_PUBLIC_GAMMA_OFFERS_ADDRESS || '0x3Da346C40A0D90cf5642944613586439A3456d45',
gammaTicketsAddress:
process.env.NEXT_PUBLIC_GAMMA_TICKETS_ADDRESS || '0xF11D042EEe43Cf7276B5A5801de1ACffbCf17887'
process.env.NEXT_PUBLIC_GAMMA_TICKETS_ADDRESS || '0x7593aad3e13fBd27F113aad8688E8817Ac4f9A33'
}

export const openSeaUrlAlpha = is_production
? `https://.opensea.io/assets/matic/${CONTRACTS.alphaAddress}`
? `https://opensea.io/assets/matic/${CONTRACTS.alphaAddress}`
: `https://testnets.opensea.io/assets/mumbai/${CONTRACTS.alphaAddress}`

export const openSeaUrlGamma = is_production
Expand Down
Loading

0 comments on commit 8e2b4f8

Please sign in to comment.