Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add hybrid app #57

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
cb81fea
feat: add hybrid-pay base
danielsimao Jul 8, 2024
c24644d
fix: wagmi flag
danielsimao Jul 17, 2024
473890c
feat: use guarantor
sander2 Jul 18, 2024
f0898a2
feat: add new design
danielsimao Jul 18, 2024
880bd8d
fix: fix some (but not all) bugs
sander2 Jul 18, 2024
6dd9557
fix: set content-type in guarantor api call
sander2 Jul 19, 2024
92a8c3a
feat: improve UI
danielsimao Jul 19, 2024
4430e1e
fix: ui
danielsimao Jul 19, 2024
3f2cbde
fix: ui
danielsimao Jul 19, 2024
41ff4b6
fix: build
danielsimao Jul 19, 2024
b11daa7
fix: build
danielsimao Jul 19, 2024
8623773
fix: remove resolution
danielsimao Jul 22, 2024
edcc7f0
fix: try out
danielsimao Jul 22, 2024
0ec3125
refactor: ui
danielsimao Jul 22, 2024
8939a76
fix: versions
danielsimao Jul 22, 2024
591ce56
fix: vite
danielsimao Jul 22, 2024
6f32da0
fix: tryout
danielsimao Jul 22, 2024
4c1170a
chore: hide usdc
sander2 Jul 22, 2024
4f23287
chore: fix typo in receive path
sander2 Jul 22, 2024
c3839da
fix: add https prefix to qr code
sander2 Jul 22, 2024
4f344f1
fix: escape special characters in qr url
sander2 Jul 22, 2024
dc19182
fix: handle receive no address
danielsimao Jul 22, 2024
6776631
fix: send crash
danielsimao Jul 22, 2024
b8f05bb
fix: prices
danielsimao Jul 22, 2024
157cf52
fix: minor ui
danielsimao Jul 22, 2024
b02f183
fix: send form
danielsimao Jul 23, 2024
ffa1f05
fix: logos
danielsimao Jul 23, 2024
c6e0d93
chore: minimum 2 usd digits
sander2 Jul 23, 2024
2d89617
Hybrid app sentry config (#74)
tomjeatt Jul 23, 2024
91740b6
feat: improve dynamic state persistance (#75)
danielsimao Jul 23, 2024
9dc37f9
fix: total balance display (#76)
danielsimao Jul 23, 2024
3070a4e
Feat/add intract call (#80)
sander2 Jul 24, 2024
5a20964
feat: add telegram (#81)
sander2 Jul 26, 2024
d4d359d
fix: arrow color
danielsimao Jul 26, 2024
7a788a6
feat: add T&C
danielsimao Jul 26, 2024
12c256b
fix: terms padding bottom
danielsimao Jul 26, 2024
24ca8aa
feat: add qr code scanner (#83)
danielsimao Jul 26, 2024
5786c08
fix: remove base sepolia (#77)
danielsimao Jul 30, 2024
39e0e4b
refactor: rename to bob-pay (#85)
danielsimao Jul 30, 2024
d1bcbee
fix: also call the api if sending from eoa (#86)
sander2 Jul 30, 2024
53f7a81
feature: add unsupported alert (#94)
tomjeatt Aug 2, 2024
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
19 changes: 19 additions & 0 deletions apps/bob-pay/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
VITE_API_URL=""
VITE_L1_CHAIN_NAME="sepolia"
VITE_COINGECKO_API_KEY=
VITE_DISPLAY_TVL_FEATURE=enabled
VITE_MARKET_DATA_API="/marketdata/v1"
VITE_GEOBLOCK_ENABLED=false
VITE_ONRAMP_API_URL="https://onramp-api-testnet.gobob.xyz"
VITE_BTC_API_URL="https://btc-testnet.gobob.xyz"
VITE_FUSION_API='http://localhost:4000'
VITE_FEATURE_FLAG_BTC_ONRAMP=disabled
VITE_INDEXER_BRIDGE_URL=""
VITE_SENTRY_URL=""
VITE_SENTRY_AUTH_TOKEN=""


/* MAINNET */
VITE_ONRAMP_API_URL="https://onramp-api-mainnet.gobob.xyz"
VITE_BTC_API_URL="https://btc-mainnet.gobob.xyz"
VITE_L1_CHAIN_NAME="ethereum"
28 changes: 28 additions & 0 deletions apps/bob-pay/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

.env
# Sentry Config File
.env.sentry-build-plugin
28 changes: 28 additions & 0 deletions apps/bob-pay/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# BOB Collective: Highway

## Local development

### Installing the project

1. Install [pnpm](https://pnpm.io/installation)
2. Run `pnpm install`

### Starting the project

1. Run `pnpm dev`

### Browser support

This application is tested using:

- Chrome
- Brave
- Firefox

In the following environments:

- Linux
- MacOS
- Windows

It does not currently support any mobile wallets.
27 changes: 27 additions & 0 deletions apps/bob-pay/api/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { createProxyMiddleware } from 'http-proxy-middleware';

const proxyMiddleware = createProxyMiddleware({
router: {
'/api': 'https://app.gobob.xyz/api',
'/dynamic-api': 'https://app.dynamicauth.com/api/v0'
},
changeOrigin: true,
pathRewrite: { '^/dynamic-api': '', '^/api': '' },
on: {
proxyReq: (proxyReq) => {
proxyReq.setHeader('x-sec-token', 'foobar');
},
proxyRes: (proxyRes) => {
// vary: accept-encoding to handle caching of compressed responses
proxyRes.headers['vary'] = 'accept-encoding';
}
}
});

export default function handler(req, res) {
proxyMiddleware(req, res, (result) => {
if (result instanceof Error) {
throw result;
}
});
}
24 changes: 24 additions & 0 deletions apps/bob-pay/api/marketdata.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export const config = {
runtime: 'edge'
};

export default async (request) => {
const url = 'https://api.coingecko.com/api/v3/simple/price?' + new URL(request.url).searchParams;
const cgResp = await fetch(url, { headers: { accept: 'application/json' } });

if (!cgResp.ok) {
const errMsg = await cgResp.text();

throw new Error(errMsg);
}

const data = await cgResp.json();

return new Response(JSON.stringify(data), {
status: 200,
headers: {
'content-type': 'application/json',
'cache-control': 'public, max-age=120, s-maxage=120, stale-while-revalidate=300, stale-if-error=300'
}
});
};
210 changes: 210 additions & 0 deletions apps/bob-pay/api/package-lock.json

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

16 changes: 16 additions & 0 deletions apps/bob-pay/api/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "api",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"http-proxy-middleware": "^3.0.0"
}
}
Loading
Loading