diff --git a/.github/workflows/check-branch.yml b/.github/workflows/check-branch.yml new file mode 100644 index 0000000..69b5dd8 --- /dev/null +++ b/.github/workflows/check-branch.yml @@ -0,0 +1,21 @@ +name: Prevent Non-Release/Non-Hotfix PRs to Main + +on: + pull_request: + branches: + - main + pull_request_target: + branches: + - main + +jobs: + check-target-branch: + if: github.base_ref == 'main' + runs-on: ubuntu-latest + steps: + - name: Check if the source branch is a release branch + run: | + if [[ "${{ github.head_ref }}" != release/* && "${{ github.head_ref }}" != hotfix/* ]]; then + echo "Only release and hotfix branches can be merged into the main branch." + exit 1 + fi \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54f2c4c..5d353e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,9 +3,9 @@ name: ci on: # Triggers the workflow on push or pull request events but only for the main branch push: - branches: [main] + branches: [main, dev] pull_request: - branches: [main] + branches: [main, dev] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: diff --git a/package.json b/package.json index 1757b27..4caae45 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mento-protocol/mento-web", - "version": "2.2.1", + "version": "2.2.2", "description": "A simple DApp for Celo Mento exchanges", "keywords": [ "Celo", diff --git a/src/components/input/Select.tsx b/src/components/input/Select.tsx index b5e5909..25f074e 100644 --- a/src/components/input/Select.tsx +++ b/src/components/input/Select.tsx @@ -23,7 +23,7 @@ export function Select({ value, optionValues, onChange, button, option, buttonLa leaveFrom="opacity-100" leaveTo="opacity-0" > - + {optionValues.map((optionValue) => ( = { CELO, cUSD, @@ -125,6 +134,7 @@ export const Tokens: Record = { eXOF, cKES, PUSO, + cCOP, } export const TokenAddresses: Record> = Object.freeze({ @@ -140,6 +150,7 @@ export const TokenAddresses: Record> = Object. [TokenId.eXOF]: '0xB0FA15e002516d0301884059c0aaC0F0C72b019D', [TokenId.cKES]: '0x1E0433C1769271ECcF4CFF9FDdD515eefE6CdF92', [TokenId.PUSO]: '0x5E0E3c9419C42a1B04e2525991FB1A2C467AB8bF', + [TokenId.cCOP]: '0xe6A57340f0df6E020c1c0a80bC6E13048601f0d4', }, [ChainId.Baklava]: { [TokenId.CELO]: '0xdDc9bE57f553fe75752D61606B94CBD7e0264eF8', @@ -153,6 +164,7 @@ export const TokenAddresses: Record> = Object. [TokenId.eXOF]: '0x64c1D812673E93Bc036AdC3D547d9950696DA5Af', [TokenId.cKES]: '0x8813Ae180017057d0Cf98C930cED1E7101B97370', [TokenId.PUSO]: '', + [TokenId.cCOP]: '', }, [ChainId.Celo]: { [TokenId.CELO]: '0x471EcE3750Da237f93B8E339c536989b8978a438', @@ -166,6 +178,7 @@ export const TokenAddresses: Record> = Object. [TokenId.eXOF]: '0x73F93dcc49cB8A239e2032663e9475dd5ef29A08', [TokenId.cKES]: '0x456a3D042C0DbD3db53D5489e98dFb038553B0d0', [TokenId.PUSO]: '0x105d4A9306D2E55a71d2Eb95B81553AE1dC20d7B', + [TokenId.cCOP]: '', }, }) diff --git a/src/images/tokens/TokenIcon.tsx b/src/images/tokens/TokenIcon.tsx index cd61e55..975d214 100644 --- a/src/images/tokens/TokenIcon.tsx +++ b/src/images/tokens/TokenIcon.tsx @@ -7,6 +7,7 @@ import USDCIcon from 'src/images/tokens/USDC.svg' import USDTIcon from 'src/images/tokens/USDT.svg' import axlEUROCIcon from 'src/images/tokens/axlEUROC.svg' import axlUSDCIcon from 'src/images/tokens/axlUSDC.svg' +import cCOPIcon from 'src/images/tokens/cCOP.svg' import cEURIcon from 'src/images/tokens/cEUR.svg' import cKESIcon from 'src/images/tokens/cKES.svg' import cREALIcon from 'src/images/tokens/cREAL.svg' @@ -45,6 +46,7 @@ function _TokenIcon({ token, size = 'm' }: Props) { else if (token?.id === TokenId.eXOF) imgSrc = eXOFIcon else if (token?.id === TokenId.cKES) imgSrc = cKESIcon else if (token?.id === TokenId.PUSO) imgSrc = PUSOIcon + else if (token?.id === TokenId.cCOP) imgSrc = cCOPIcon if (imgSrc) { return ( diff --git a/src/images/tokens/cCOP.svg b/src/images/tokens/cCOP.svg new file mode 100644 index 0000000..7d4c512 --- /dev/null +++ b/src/images/tokens/cCOP.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/styles/globals.css b/src/styles/globals.css index 663b517..d667f0b 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -214,3 +214,14 @@ Toasts --toastify-color-progress-warning: var(--toastify-color-warning); --toastify-color-progress-error: var(--toastify-color-error); } + +@media (max-width: 640px) { + .dropdown-menu { + position: fixed !important; + bottom: auto !important; + top: auto !important; + max-height: 25vh !important; + width: 48% !important; + z-index: 9999 !important; + } +}