Skip to content

Commit

Permalink
Merge pull request #180 from P4-Games/develop
Browse files Browse the repository at this point in the history
Deploy #20231126
  • Loading branch information
dappsar committed Nov 27, 2023
2 parents 3568634 + 4014793 commit a520d25
Show file tree
Hide file tree
Showing 21 changed files with 1,049 additions and 945 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ name: "CodeQL"

on:
push:
branches: [ "main", "develop" ]
branches: [ "develop" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Google Auth
id: 'auth'
Expand Down
53 changes: 50 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"swr": "^2.0.3",
"url-loader": "^4.1.1",
"use-local-storage": "^2.3.6",
"uuid": "^9.0.1",
"wagmi": "^0.9.2",
"web3modal": "^1.9.9"
},
Expand Down
4 changes: 3 additions & 1 deletion public/locales/br/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,7 @@
"offer_exchange_message": "Você vai enviar o carta <b>#{CARD_NUMBER_FROM}</b> para o usuário com a carteira {WALLET_TO} e receberá em troca a carta <b>#{CARD_NUMBER_TO}</b>.",
"offer_only_own_offer": "A única oferta disponível para esta carta é a sua.",
"offer_card_number_empty": "Não há ofertas para esta carta.",
"offer_card_no_la_tienes": "Você não tem este cartão para trocá-lo."
"offer_card_no_la_tienes": "Você não tem este cartão para trocá-lo.",
"offer_user_limit": "Você atingiu o limite de ofertas que pode fazer. Aguarde para confirmar uma troca ou remover uma publicação.",
"offer_game_limit": "No momento, nenhuma outra oferta pode ser feita. Tente em alguns dias."
}
4 changes: 3 additions & 1 deletion public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,7 @@
"offer_exchange_message": "You are going to send card <b>#{CARD_NUMBER_FROM}</b> to the user with wallet {WALLET_TO} and will receive in return the card <b>#{CARD_NUMBER_TO}</b>.",
"offer_only_own_offer": "The only offer available for this card is yours.",
"offer_card_number_empty": "There are no offers for this card.",
"offer_card_no_la_tienes": "You do not have this card to exchange it."
"offer_card_no_la_tienes": "You do not have this card to exchange it.",
"offer_user_limit": "You have reached the limit of offers you can make. Wait to confirm an exchange or remove a publication.",
"offer_game_limit": "At the moment, no more offers can be made. Please try in a few days."
}
5 changes: 4 additions & 1 deletion public/locales/es/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
"offer_exchange_message": "Vas a enviar la carta <b>#{CARD_NUMBER_FROM}</b> al usuario con wallet {WALLET_TO} y recibirás a cambio la carta <b>#{CARD_NUMBER_TO}</b>.",
"offer_only_own_offer": "La única oferta que hay para ésta carta es la tuya.",
"offer_card_number_empty": "No hay ofertas para esta carta.",
"offer_card_no_la_tienes": "No tienes esta carta para poder intercambiarla."
"offer_card_no_la_tienes": "No tienes esta carta para poder intercambiarla.",
"offer_user_limit": "Alcanzaste el límite de ofertas que podes realizar. Espera a confirmar algún intercambio o quita alguna publicación.",
"offer_game_limit": "Por el momento, no se pueden realizar más ofertas. Intenta en unos días."


}
3 changes: 0 additions & 3 deletions src/components/Footer/FooterButtons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ import Link from 'next/link'
import { useLayoutContext } from '../../hooks'

function FooterButtons () {

const { showDefaultButtons, showButtons, buttonFunctions } = useLayoutContext()

console.log({ showButtons, showDefaultButtons, buttonFunctions })

const DefaultButtons = () => (
<div className='footer__buttons'>
Expand Down
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const CONTRACTS = {
gammaCardsAddress:
process.env.NEXT_PUBLIC_GAMMA_CARDS_ADDRESS || '0xb2da44Bd77e922142F3Ef20504826e83D4e9fc0C',
gammaOffersAddress:
process.env.NEXT_PUBLIC_GAMMA_OFFERS_ADDRESS || '0x18537721EDfdEa2060640314BD996672E0DB921D'
process.env.NEXT_PUBLIC_GAMMA_OFFERS_ADDRESS || '0xc2E8cEE4dC93F24b9Bc70A100083C0A6075694cE'
}

export const openSeaUrlAlpha = is_production
Expand Down
26 changes: 10 additions & 16 deletions src/context/LayoutContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,17 @@ function LayoutProvider({ children }) {
const [buttonFunctions, setButtonFunctions] = useState([null, null, null, null])
const [showButtons, setShowButtons] = useState([true, true, true, true])

const updateButtonFunctions = useCallback(
(index, newFunction) => {
setButtonFunctions((prevFunctions) => {
const updatedFunctions = [...prevFunctions]
updatedFunctions[index] = newFunction
return updatedFunctions
})
},
[buttonFunctions]
)
const updateButtonFunctions = useCallback((index, newFunction) => {
setButtonFunctions((prevFunctions) => {
const updatedFunctions = [...prevFunctions]
updatedFunctions[index] = newFunction
return updatedFunctions
})
}, [])

const updateShowButtons = useCallback(
(btn1, btn2, btn3, btn4) => {
setShowButtons(btn1, btn2, btn3, btn4)
},
[showButtons]
)
const updateShowButtons = useCallback((btn1, btn2, btn3, btn4) => {
setShowButtons(btn1, btn2, btn3, btn4)
}, [])

const startLoading = useCallback(() => {
setLoading(true)
Expand Down
3 changes: 1 addition & 2 deletions src/context/Web3Context.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import daiAbi from './abis/TestDAI.v2.sol/NofTestDAIV2.json'
import alphaAbi from './abis/Alpha.v2.sol/NofAlphaV2.json'
import gammaPacksAbi from './abis/GammaPacks.v2.sol/NofGammaPacksV2.json'
import gammaCardsAbi from './abis/GammaCards.v4.sol/NofGammaCardsV4.json'
import gammaOffersAbi from './abis/GammaOffers.v1.sol/NofGammaOffersV1.json'
import gammaOffersAbi from './abis/GammaOffers.v3.sol/NofGammaOffersV3.json'
import { CONTRACTS, NETWORK } from '../config'

const initialState = {
Expand Down Expand Up @@ -94,7 +94,6 @@ function Web3ContextProvider({ children }) {
gammaCardsAbi.abi,
_signer
)
console.log('web3 gammaCardsContractInstance', gammaCardsContractInstance)
const gammaOffersContractInstance = new ethers.Contract(
CONTRACTS.gammaOffersAddress,
gammaOffersAbi.abi,
Expand Down
3 changes: 1 addition & 2 deletions src/context/Web3ContextNew.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ import daiAbi from './abis/TestDAI.v2.sol/NofTestDAIV2.json'
import alphaAbi from './abis/Alpha.v2.sol/NofAlphaV2.json'
import gammaPacksAbi from './abis/GammaPacks.v2.sol/NofGammaPacksV2.json'
import gammaCardsAbi from './abis/GammaCards.v4.sol/NofGammaCardsV4.json'
import gammaOffersAbi from './abis/GammaOffers.v1.sol/NofGammaOffersV1.json'
import gammaOffersAbi from './abis/GammaOffers.v3.sol/NofGammaOffersV3.json'
import { CONTRACTS, NETWORK, WalletConnectProjectId } from '../config'

import brLocales from '../../public/locales/br/web3_onboard.json'
import enLocales from '../../public/locales/en/web3_onboard.json'
import esLocales from '../../public/locales/es/web3_onboard.json'
// import { useSettingsContext } from '../hooks'

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

Expand Down
Loading

0 comments on commit a520d25

Please sign in to comment.