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

merge from Test #295

Merged
merged 30 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
9c3556d
Bump @capacitor/camera from 5.0.8 to 5.0.10
dependabot[bot] Sep 9, 2024
e108fae
Bump uuid and @types/uuid
dependabot[bot] Sep 9, 2024
74f0392
Bump eslint-plugin-react-hooks from 4.6.0 to 4.6.2
dependabot[bot] Sep 9, 2024
23b50b0
Bump @ionic/react-router from 7.7.3 to 8.3.0
dependabot[bot] Sep 9, 2024
29b37b8
add nav button & pages
polarDefender Sep 10, 2024
ece74c8
fix css & copy
polarDefender Sep 10, 2024
b79340b
fix notification
polarDefender Sep 10, 2024
d9312e3
fix offers edit & copy
polarDefender Sep 10, 2024
e4bbff4
fix responsive & select option & connect state
polarDefender Sep 13, 2024
9370956
Merge pull request #286 from shocknet/update-invitations-page
shocknet-justin Sep 15, 2024
985fd85
Merge pull request #270 from shocknet/dependabot/npm_and_yarn/capacit…
shocknet-justin Sep 15, 2024
a94a994
Merge pull request #272 from shocknet/dependabot/npm_and_yarn/eslint-…
shocknet-justin Sep 15, 2024
ef3946e
Merge pull request #271 from shocknet/dependabot/npm_and_yarn/multi-8…
shocknet-justin Sep 15, 2024
4798313
Merge pull request #273 from shocknet/dependabot/npm_and_yarn/ionic/r…
shocknet-justin Sep 15, 2024
bbb512d
pathname error
shocknet-justin Sep 15, 2024
ae79e41
router?
shocknet-justin Sep 15, 2024
e3d6bb2
new router
shocknet-justin Sep 15, 2024
ed871fc
pwa?
shocknet-justin Sep 15, 2024
e63a767
new router invite links
shocknet-justin Sep 15, 2024
cbea8c4
boundary
shocknet-justin Sep 15, 2024
65d23dd
invite path
shocknet-justin Sep 15, 2024
e9b26da
status bar
shocknet-justin Sep 16, 2024
7399184
fix add confirmation dialog
polarDefender Sep 17, 2024
6c23ba6
Merge pull request #291 from shocknet/update-sources-page
shocknet-justin Sep 17, 2024
d9a92c3
bridge nip98 integration
Sep 17, 2024
4569516
revert nostr-tools to its previous version in the project
Sep 17, 2024
59cccfa
fix selector
polarDefender Sep 17, 2024
b73124b
Merge pull request #293 from shocknet/updated-offers-page
shocknet-justin Sep 17, 2024
0b7d468
fix
Sep 17, 2024
79177a1
Merge pull request #294 from snake-eaterr/bridge-integration-nip98
shocknet-justin Sep 17, 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
1,428 changes: 1,123 additions & 305 deletions package-lock.json

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@capacitor/android": "5.4.0",
"@capacitor/app": "5.0.6",
"@capacitor/browser": "^5.2.0",
"@capacitor/camera": "^5.0.7",
"@capacitor/camera": "^5.0.10",
"@capacitor/clipboard": "^5.0.6",
"@capacitor/core": "5.7.8",
"@capacitor/filesystem": "^5.1.4",
Expand All @@ -32,8 +32,8 @@
"@gandlaf21/bolt11-decode": "^3.0.6",
"@ionic-native/camera": "^5.36.0",
"@ionic/pwa-elements": "^3.2.2",
"@ionic/react": "^7.0.0",
"@ionic/react-router": "^7.0.0",
"@ionic/react": "^8.3.0",
"@ionic/react-router": "^8.3.0",
"@noble/curves": "^1.5.0",
"@noble/hashes": "^1.5.0",
"@noble/secp256k1": "^2.0.0",
Expand Down Expand Up @@ -83,7 +83,7 @@
"reactjs-qr-reader": "^1.1.0",
"sortablejs": "^1.15.1",
"styled-components": "^6.0.8",
"uuid": "^9.0.1"
"uuid": "^10.0.0"
},
"devDependencies": {
"@capacitor/assets": "^3.0.5",
Expand All @@ -94,7 +94,7 @@
"@types/deep-diff": "^1.0.5",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@types/uuid": "^9.0.7",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^8.3.0",
"@typescript-eslint/parser": "^8.3.0",
"@vitejs/plugin-legacy": "^4.0.2",
Expand All @@ -103,12 +103,13 @@
"eslint": "^8.56.0",
"eslint-plugin-cypress": "^2.15.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-hooks": "^4.6.2",
"jsdom": "^22.1.0",
"sass": "^1.67.0",
"typescript": "^5.3.3",
"vite": "^4.3.9",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-pwa": "^0.20.5",
"vitest": "^0.32.2"
},
"description": "An Ionic project"
Expand Down
16 changes: 12 additions & 4 deletions public/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,18 @@ self.addEventListener('click', event => {
});

self.addEventListener('fetch', event => {
event.respondWith(
caches.match(event.request)
.then(response => response || fetch(event.request))
);
if (event.request.mode === 'navigate') {
event.respondWith(
fetch(event.request).catch(() => {
return caches.match('/index.html');
})
);
} else {
event.respondWith(
caches.match(event.request)
.then(response => response || fetch(event.request))
);
}
});

self.addEventListener('beforeinstallprompt', event => {
Expand Down
32 changes: 32 additions & 0 deletions src/Api/bridge/autogenerated/ts/http_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export type ResultError = { status: 'ERROR', reason: string }
export type ClientParams = {
baseUrl: string
retrieveGuestAuth: () => Promise<string | null>
retrieveNostrAuth: () => Promise<string | null>
encryptCallback: (plain: any) => Promise<any>
decryptCallback: (encrypted: any) => Promise<any>
deviceId: string
Expand All @@ -26,6 +27,20 @@ export default (params: ClientParams) => ({
}
return { status: 'ERROR', reason: 'invalid response' }
},
GetOrCreateNofferName: async (request: Types.GetOrCreateNofferNameRequest): Promise<ResultError | ({ status: 'OK' }& Types.GetOrCreateNofferNameResponse)> => {
const auth = await params.retrieveNostrAuth()
if (auth === null) throw new Error('retrieveNostrAuth() returned null')
let finalRoute = '/api/v1/noffer/vanity'
const { data } = await axios.post(params.baseUrl + finalRoute, request, { headers: { 'authorization': auth } })
if (data.status === 'ERROR' && typeof data.reason === 'string') return data
if (data.status === 'OK') {
const result = data
if(!params.checkResult) return { status: 'OK', ...result }
const error = Types.GetOrCreateNofferNameResponseValidate(result)
if (error === null) { return { status: 'OK', ...result } } else return { status: 'ERROR', reason: error.message }
}
return { status: 'ERROR', reason: 'invalid response' }
},
HandleLnurlPay: async (query: Types.HandleLnurlPay_Query): Promise<ResultError | ({ status: 'OK' }& Types.HandleLnurlPayResponse)> => {
const auth = await params.retrieveGuestAuth()
if (auth === null) throw new Error('retrieveGuestAuth() returned null')
Expand All @@ -42,6 +57,23 @@ export default (params: ClientParams) => ({
}
return { status: 'ERROR', reason: 'invalid response' }
},
HandleLnurlPayUsername: async (query: Types.HandleLnurlPayUsername_Query, routeParams: Types.HandleLnurlPayUsername_RouteParams): Promise<ResultError | ({ status: 'OK' }& Types.HandleLnurlPayResponse)> => {
const auth = await params.retrieveGuestAuth()
if (auth === null) throw new Error('retrieveGuestAuth() returned null')
let finalRoute = '/api/lnurl_pay/:address_name'
finalRoute = finalRoute.replace(':address_name', routeParams['address_name'])
const q = (new URLSearchParams(query)).toString()
finalRoute = finalRoute + (q === '' ? '' : '?' + q)
const { data } = await axios.get(params.baseUrl + finalRoute, { headers: { 'authorization': auth } })
if (data.status === 'ERROR' && typeof data.reason === 'string') return data
if (data.status === 'OK') {
const result = data
if(!params.checkResult) return { status: 'OK', ...result }
const error = Types.HandleLnurlPayResponseValidate(result)
if (error === null) { return { status: 'OK', ...result } } else return { status: 'ERROR', reason: error.message }
}
return { status: 'ERROR', reason: 'invalid response' }
},
HandleLnurlAddress: async (routeParams: Types.HandleLnurlAddress_RouteParams): Promise<ResultError | ({ status: 'OK' }& Types.LnurlPayInfoResponse)> => {
const auth = await params.retrieveGuestAuth()
if (auth === null) throw new Error('retrieveGuestAuth() returned null')
Expand Down
Loading
Loading