diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index d1c0b77..ac38b77 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -11,10 +11,15 @@ jobs: env: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID_STAGING }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_STAGING }} + ENV_VARIABLE: ${{ secrets.ENV_STAGING }} + steps: - name: 🏗 Setup repo uses: actions/checkout@v3 + - name: 🏗 Config .env + run: echo "$ENV_VARIABLE" > .env + - name: 🏗 Install Vercel CLI run: npm install --global vercel@latest @@ -33,10 +38,15 @@ jobs: env: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + ENV_VARIABLE: ${{ secrets.ENV_PROD }} + steps: - name: 🏗 Setup repo uses: actions/checkout@v3 + - name: 🏗 Config .env + run: echo "$ENV_VARIABLE" > .env + - name: 🏗 Install Vercel CLI run: npm install --global vercel@latest diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e43e132..ac050ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,19 +23,18 @@ jobs: build: runs-on: ubuntu-latest + env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID_STAGING }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_STAGING }} steps: - name: 🏗 Setup repo uses: actions/checkout@v3 - - name: 📦 Build docker image - run: | - docker build -t p2pix:$GITHUB_SHA . - docker save -o image_$GITHUB_SHA p2pix:$GITHUB_SHA + - name: 🏗 Install Vercel CLI + run: npm install --global vercel@latest - - name: 📦 Put docker image in cache - uses: actions/cache@v3 - with: - key: p2pix - path: image_${{ github.sha }} + - name: 🏗 Pull staging app from vercel environment + run: vercel pull --yes --token=${{ secrets.VERCEL_AUTH_TOKEN }} - # test job \ No newline at end of file + - name: 📦 Build staging app artifacts + run: vercel build --token=${{ secrets.VERCEL_AUTH_TOKEN }} \ No newline at end of file diff --git a/src/assets/bg.svg b/src/assets/bg.svg index 4d68b68..f17cb3f 100644 --- a/src/assets/bg.svg +++ b/src/assets/bg.svg @@ -1,36 +1,34 @@ - - - - - - + + + + + + + - - - - - - - + + + + - - - - - - - - - - - - + + - + + + + + + + + + + + - + diff --git a/src/assets/redirect.svg b/src/assets/redirect.svg new file mode 100644 index 0000000..5f3be00 --- /dev/null +++ b/src/assets/redirect.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/ListComponent.vue b/src/components/ListComponent.vue new file mode 100644 index 0000000..4211256 --- /dev/null +++ b/src/components/ListComponent.vue @@ -0,0 +1,151 @@ + + +
+
+ Os tokens já foram transferidos
+ para a sua carteira! +
+
+
+
+
+

Tokens recebidos

+

{{ props.tokenAmount }} BRZ

+
+
+

+ Não encontrou os tokens? Clique no botão abaixo para
+ cadastrar o BRZ em sua carteira. +

+
+ +
+ +
+
+ Últimas transações + +
+
+
+ Valor + Tipo de transação + Checar transação +
+
+ + {{ formatEventsAmount(release?.args.amount) }} BRZ + + + {{ "Compra" }} + +
+ Etherscan + Redirect image +
+
+
+ +
+ +

+ Não há nenhuma transação anterior +

+
+
+ + + diff --git a/src/components/ValidationComponent.vue b/src/components/LoadingComponent.vue similarity index 82% rename from src/components/ValidationComponent.vue rename to src/components/LoadingComponent.vue index a40a2c7..57d5582 100644 --- a/src/components/ValidationComponent.vue +++ b/src/components/LoadingComponent.vue @@ -1,10 +1,17 @@ - + + diff --git a/src/views/ListView.vue b/src/views/ListView.vue new file mode 100644 index 0000000..49c39a4 --- /dev/null +++ b/src/views/ListView.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/src/views/MockView.vue b/src/views/MockView.vue index b958d43..faf0fbb 100644 --- a/src/views/MockView.vue +++ b/src/views/MockView.vue @@ -7,6 +7,7 @@ import blockchain from "../utils/blockchain"; // Blockchain Data const etherStore = useEtherStore(); +const { depositsValidList } = storeToRefs(etherStore); const { depositsAddedList } = storeToRefs(etherStore); const { locksAddedList } = storeToRefs(etherStore); @@ -15,7 +16,7 @@ const depositValue = ref(); const depositPixKey = ref(""); // Split tokens between wallets in wallets.json -const splitTokens = () => { +const splitTokens = async () => { blockchain.splitTokens(); }; @@ -35,23 +36,20 @@ const formatWalletAddress = (wallet: string): string => { // Gets value and pix key from user's form to create a deposit in the blockchain const mockDeposit = () => { if (!depositValue.value || !depositPixKey.value) return; - blockchain.addDeposit(depositValue.value.toString(), depositPixKey.value); + blockchain.addDeposit(depositValue.value, depositPixKey.value); }; // Get specific deposit data by its ID const mapDeposit = (depositId: BigNumber) => { - blockchain.mapDeposits(depositId); + const deposit = blockchain.mapDeposits(depositId); + return deposit; }; // Lock methods -// (TO DO) Releases lock by specific ID and other additional data -const releaseLock = () => { - blockchain.releaseLock(); -}; - // Get specific lock data by its ID const mapLock = (lockId: string) => { - blockchain.mapLocks(lockId); + const lock = blockchain.mapLocks(lockId); + return lock; }; @@ -81,10 +79,6 @@ const mapLock = (lockId: string) => { - - + diff --git a/src/views/SellerView.vue b/src/views/SellerView.vue new file mode 100644 index 0000000..8f16641 --- /dev/null +++ b/src/views/SellerView.vue @@ -0,0 +1,60 @@ + + + + +