Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

[Frontend] Starbridge Integration #100

Open
wants to merge 92 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
3fc9f94
feat: add react typescript project
welladam Aug 18, 2022
4f85881
refactor: remove storybook
welladam Aug 18, 2022
8fee272
feat: Create typography components
IsabellePinheiro Aug 19, 2022
ab33edc
chore: Remove border colors
IsabellePinheiro Aug 19, 2022
d450f35
feat: change button component
welladam Aug 22, 2022
0dcbe77
refactor: change css variables file
welladam Aug 22, 2022
b793244
feat: add click event
welladam Aug 22, 2022
8ad9858
styles: Remove styles folder
IsabellePinheiro Aug 22, 2022
ad7039c
Merge pull request #1 from CheesecakeLabs/ssu-3-create-typography-com…
welladam Aug 22, 2022
2d8ddfe
Merge branch 'dev' into ssu-2_create-button-component
welladam Aug 22, 2022
8ecfed0
Merge pull request #3 from CheesecakeLabs/ssu-2_create-button-component
welladam Aug 22, 2022
ebdc5b8
feat: Create input component
IsabellePinheiro Aug 23, 2022
9c55386
Merge branch 'main' of https://github.com/CheesecakeLabs/starbridge i…
IsabellePinheiro Aug 23, 2022
9a388a4
feat: add react-modal lib
welladam Aug 25, 2022
2d6e984
feat: change button style
welladam Aug 25, 2022
c465b95
feat: create modal component
welladam Aug 25, 2022
d75c5fb
feat: create sign transaction modal component
welladam Aug 25, 2022
3163e92
feat: change css variables files
welladam Aug 25, 2022
2805bfe
feat: Styling input component
IsabellePinheiro Aug 25, 2022
0c6af6f
Merge branch 'dev' of https://github.com/CheesecakeLabs/starbridge in…
IsabellePinheiro Aug 25, 2022
bb17f74
refactor: update incorrect text
welladam Aug 26, 2022
b112678
Merge pull request #5 from CheesecakeLabs/SSU-9_create-modal-component
welladam Aug 29, 2022
3b57df5
feat: Create header
IsabellePinheiro Aug 29, 2022
190279d
Merge branch 'dev' of https://github.com/CheesecakeLabs/starbridge in…
IsabellePinheiro Aug 29, 2022
e2bd5f5
feat: Add route to logo
IsabellePinheiro Aug 29, 2022
5b81a2d
feat: Set buttons initial state
IsabellePinheiro Aug 29, 2022
3cd4aaa
styles: Update input behavior
IsabellePinheiro Aug 29, 2022
172a75c
Merge branch 'dev' of https://github.com/CheesecakeLabs/starbridge in…
IsabellePinheiro Aug 29, 2022
fdb0756
chore: Add abstraction to set icon and label
IsabellePinheiro Aug 30, 2022
51f0cdc
Merge pull request #4 from CheesecakeLabs/ssu-4-create-input-component
IsabellePinheiro Aug 30, 2022
1bedea6
Merge branch 'dev' of https://github.com/CheesecakeLabs/starbridge in…
IsabellePinheiro Aug 30, 2022
6a564f1
chore: Replace label for typography component
IsabellePinheiro Aug 30, 2022
f2fe613
Merge pull request #6 from CheesecakeLabs/SSU-17-create-header-component
IsabellePinheiro Aug 30, 2022
cf73ec9
refactor: change currency enum
welladam Aug 31, 2022
b55097a
feat: create home template
welladam Aug 31, 2022
5caee51
feat: Create form component
IsabellePinheiro Aug 31, 2022
2217265
chore: Remove unused code snipet
IsabellePinheiro Aug 31, 2022
33db63d
chore: Replace any for FieldValues
IsabellePinheiro Sep 7, 2022
9dd07c1
Merge pull request #8 from CheesecakeLabs/SSU-7-create-form-component
IsabellePinheiro Sep 7, 2022
1cb6c98
Merge pull request #7 from CheesecakeLabs/SSU-20_create-home-template
welladam Sep 7, 2022
3af802e
feat: Create currency logic
IsabellePinheiro Sep 13, 2022
b4b622a
chore: Update const names
IsabellePinheiro Sep 15, 2022
c2d000c
Merge pull request #9 from CheesecakeLabs/SSU-26-home-buttons-and-lab…
welladam Sep 16, 2022
7c240ce
feat: create wallet connect interface
welladam Sep 16, 2022
8e94f25
feat: use wallet connect in page/template
welladam Sep 16, 2022
b2b411f
feat: add docker files
welladam Sep 16, 2022
24257d4
Merge pull request #10 from CheesecakeLabs/SSU-23_create-wallet-conne…
welladam Sep 16, 2022
6a5ab2f
Merge pull request #11 from CheesecakeLabs/dev
welladam Sep 16, 2022
b8b8a8b
feat: add react typescript project
welladam Aug 18, 2022
48e73e9
feat: change button component
welladam Aug 22, 2022
858cd3a
refactor: remove storybook
welladam Aug 18, 2022
f325a24
feat: Create typography components
IsabellePinheiro Aug 19, 2022
510a78d
chore: Remove border colors
IsabellePinheiro Aug 19, 2022
bc01652
styles: Remove styles folder
IsabellePinheiro Aug 22, 2022
3c2d714
feat: Add route to logo
IsabellePinheiro Aug 29, 2022
8769c0c
feat: Create input component
IsabellePinheiro Aug 23, 2022
784b1da
feat: Styling input component
IsabellePinheiro Aug 25, 2022
10b61e6
styles: Update input behavior
IsabellePinheiro Aug 29, 2022
68c2304
chore: Add abstraction to set icon and label
IsabellePinheiro Aug 30, 2022
fce894f
feat: Create form component
IsabellePinheiro Aug 31, 2022
0a66f69
refactor: change currency enum
welladam Aug 31, 2022
c56bbe5
feat: Create currency logic
IsabellePinheiro Sep 13, 2022
ab03b4a
feat: Update input behavior
IsabellePinheiro Sep 19, 2022
fda69bb
feat: add react typescript project
welladam Aug 18, 2022
a2f01e3
feat: change button component
welladam Aug 22, 2022
afd495f
refactor: remove storybook
welladam Aug 18, 2022
d69d53e
feat: Create typography components
IsabellePinheiro Aug 19, 2022
be47835
chore: Remove border colors
IsabellePinheiro Aug 19, 2022
ad3c6fa
styles: Remove styles folder
IsabellePinheiro Aug 22, 2022
3f50dd1
feat: Create input component
IsabellePinheiro Aug 23, 2022
2173f84
feat: Styling input component
IsabellePinheiro Aug 25, 2022
5091bdd
styles: Update input behavior
IsabellePinheiro Aug 29, 2022
f1554eb
chore: Add abstraction to set icon and label
IsabellePinheiro Aug 30, 2022
2bf5c9c
feat: Create form component
IsabellePinheiro Aug 31, 2022
5fdab96
refactor: change currency enum
welladam Aug 31, 2022
2a20fda
feat: Create currency logic
IsabellePinheiro Sep 13, 2022
d91a626
feat: create wallet connect interface
welladam Sep 16, 2022
693977e
chore: Rewrite condition
IsabellePinheiro Sep 19, 2022
553f408
refactor: rebase changes
welladam Sep 21, 2022
bbb2e97
Merge branch 'main' into dev
welladam Sep 21, 2022
03f7680
Merge pull request #14 from CheesecakeLabs/dev
welladam Sep 21, 2022
d546c75
feat: integrate wallet connect with UI
welladam Sep 21, 2022
ca05607
Merge pull request #15 from CheesecakeLabs/dev
welladam Sep 21, 2022
d8fde49
wip: wallet/stellar/starbridge integrations
welladam Oct 4, 2022
c77affb
Merge pull request #16 from CheesecakeLabs/sign-transaction-wallet-co…
welladam Nov 1, 2022
38bab33
feat: starbridge integration
welladam Nov 1, 2022
29c96ca
refactor: remove unused useState
welladam Nov 1, 2022
efa6648
Merge remote-tracking branch 'upstream/main'
welladam Nov 1, 2022
24eccdb
Merge pull request #17 from CheesecakeLabs/dev
welladam Nov 1, 2022
6c72d45
refactor: change docker start command
welladam Nov 1, 2022
f567aef
feat: create github documentation
welladam Nov 1, 2022
1f1936a
Merge branch 'main' into main
welladam Nov 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion react-web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ ENV PATH /app/node_modules/.bin:$PATH
COPY . /app
RUN npm install --silent

CMD ["npm", "start"]
CMD ["npm", "run", "start:dev"]
73 changes: 40 additions & 33 deletions react-web/README.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,70 @@
# starbridge-client

This project was bootstrapped with [Create React App](https://create-react-app.dev/) using the [Typescript template](https://github.com/facebook/create-react-app/tree/master/packages/cra-template-typescript).
# Starbridge - Frontend

## Project Architecture

You can check the project architecture [here](./src/docs/ARCHITECTURE.md)
The objective of this project is to transfer assets between wallets from different networks.
Currently the available flows are from **Stellar to Ethereum** and vice versa, being able to send only **ETH** from one to the other.
With some initial setup you will be able to connect your wallets using **Freighter** for Stellar and **Metamask** for Ethereum and start the transfer flow.

## Requirements
⚠️ Remembering that the **refund** flow was not implemented in both transfer flows!

- [NodeJS 14+](https://nodejs.org/en/)
- [NPM 6.14+](https://www.npmjs.com/)
## Project Architecture

> We suggest use of [NVM](https://github.com/nvm-sh/nvm/blob/master/README.md) to manage your node versions.
**Front:** React, Typescript using the Atomic Design

## Getting Started
You can check the project architecture [here](./src/docs/ARCHITECTURE.md)

### Env vars config
## Environment Variables

The environment variables are in `src/config`. You can use the `.env.example` as a base to create your `.env.local`
config file

### Install dependencies

```shell
npm install
## Run Locally

Install dependencies

```bash
npm install
```

### Running in development environment
Start the server

```shell
npm run start:dev
```bash
npm run start:dev
```

The project will be running at [http://localhost:3000/](http://localhost:3000/)

### Running tests
If you want you can run it on **Docker** too.

- We use the [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/) to develop our tests.
- You can use the [MSW](https://mswjs.io/) to mock your request to do integration tests in your pages.
- An example is available at `src/tests/request_mocks`

```shell
npm run test
```bash
docker build -t starbridge-front .
docker run -dp 3000:3000 starbridge-front
```

### Creating a production build
### Using the ngrok

To make transactions on your wallets, you must have a secure connection locally. With [ngrok](https://ngrok.com/download) it is possible to create an SSL certificate to be able to continue in the flow without problems.

The following command will generate an optimized production build. The statics files will be generated at `build/` folder.
You need to [register](https://dashboard.ngrok.com/signup), to generate a token and then continue configuring ngrok.

```shell
npm run build
```bash
ngrok config add-authtoken <token>
ngrok http 3000
```

You can read more about how to serve the statics [here](https://create-react-app.dev/docs/deployment/)
## FAQ

#### I disconnected my account through the page, but when I connect again it automatically connects.

It is necessary that you disconnect from the page through your Wallet as well, so you can connect another account again.

#### I'm trying to do the withdraw action on the Ethereum -> Stellar flow but the error "retry later once the transaction has more confirmations" appears.

Confirmations are required to verify and legitimize information that will be recorded in the blockchain and cannot be changed afterward. If some information is assumed fraudulent, it will not get any confirmation. Without a single transaction confirmation Ethereum, the transaction won’t be considered valid by the network. Each confirmation takes less than one minute. Just wait a bit and try to perform the withdraw action again.

## Scripts

In the project directory, you can run all of [react-scripts](https://create-react-app.dev/docs/available-scripts) commands.

## Learn More
## Demo

To learn React, check out the [React documentation](https://reactjs.org/).
![](https://s4.gifyu.com/images/ezgif.com-gif-maker-1940da4e499b61722.gif)
Loading