-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into sc-platform/issue-3087-display-object-ext
- Loading branch information
Showing
178 changed files
with
10,571 additions
and
3,279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Build Wallet App (Prod) | ||
|
||
on: | ||
push: | ||
tags: | ||
- "wallet-v[0-9]+.[0-9]+.[0-9]+" | ||
|
||
env: | ||
DEFAULT_NETWORK: ${{ secrets.WALLET_PROD_DEFAULT_NETWORK }} | ||
IOTA_NETWORKS: ${{ secrets.WALLET_PROD_IOTA_NETWORKS }} | ||
APPS_BACKEND: ${{ secrets.WALLET_PROD_APPS_BACKEND }} | ||
|
||
jobs: | ||
wallet-prod-build: | ||
permissions: | ||
contents: read | ||
runs-on: [self-hosted] | ||
steps: | ||
- name: Checking out the repository | ||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3 | ||
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # [email protected] | ||
- name: Install Nodejs | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # [email protected] | ||
with: | ||
node-version: "20" | ||
cache: "pnpm" | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
- name: get-npm-version | ||
id: package-version | ||
uses: martinbeentjes/npm-get-version-action@3cf273023a0dda27efcd3164bdfb51908dd46a5b # [email protected] | ||
with: | ||
path: apps/wallet | ||
- name: Create artifact name | ||
shell: bash | ||
run: | | ||
export artifact_name="iota-wallet-${{ steps.package-version.outputs.current-version }}" | ||
echo "artifact_name=${artifact_name}" >> $GITHUB_ENV | ||
- name: Build Wallet | ||
run: pnpm wallet build | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4 | ||
with: | ||
name: ${{ env.artifact_name }} | ||
path: | | ||
./apps/wallet/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...oard/lib/constants/migration.constants.ts → ...core/src/constants/migration.constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// Copyright (c) 2024 IOTA Stiftung | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { useState } from 'react'; | ||
import { type InfiniteData, type UseInfiniteQueryResult } from '@tanstack/react-query'; | ||
|
||
interface PaginationProps { | ||
hasFirst: boolean; | ||
hasPrev: boolean; | ||
hasNext: boolean; | ||
onFirst(): void; | ||
onPrev(): void; | ||
onNext(): void; | ||
} | ||
|
||
interface CursorPaginationProps extends PaginationProps { | ||
currentPage: number; | ||
} | ||
|
||
export interface PaginationResponse<Cursor = string> { | ||
nextCursor: Cursor | null; | ||
hasNextPage: boolean; | ||
} | ||
|
||
export function useCursorPagination<T>(query: UseInfiniteQueryResult<InfiniteData<T>>) { | ||
const [currentPage, setCurrentPage] = useState(0); | ||
|
||
return { | ||
...query, | ||
data: query.data?.pages[currentPage], | ||
pagination: { | ||
onFirst: () => setCurrentPage(0), | ||
onNext: () => { | ||
if (!query.data || query.isFetchingNextPage) { | ||
return; | ||
} | ||
|
||
// Make sure we are at the end before fetching another page | ||
if (currentPage >= query.data.pages.length - 1) { | ||
query.fetchNextPage(); | ||
} | ||
|
||
setCurrentPage(currentPage + 1); | ||
}, | ||
onPrev: () => { | ||
setCurrentPage(Math.max(currentPage - 1, 0)); | ||
}, | ||
hasFirst: currentPage !== 0, | ||
hasNext: | ||
!query.isFetchingNextPage && | ||
(currentPage < (query.data?.pages.length ?? 0) - 1 || !!query.hasNextPage), | ||
hasPrev: currentPage !== 0, | ||
currentPage, | ||
} satisfies CursorPaginationProps, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/ui-kit/src/lib/components/atoms/visual-asset-card/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// Copyright (c) 2024 IOTA Stiftung | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
export { VisualAssetCard } from './VisualAssetCard'; | ||
export * from './VisualAssetCard'; | ||
export * from './visual-asset-card.enums'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.