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/LIVE-3665 - NFT gallery #1775

Merged
merged 54 commits into from
Nov 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
de7f803
nft some debugging to remove after. Console log before after metadata…
nparigi-ledger Sep 30, 2022
ee72cb2
✨ feat(Card): NFT card in gallery (#1448)
mcayuelas-ledger Oct 4, 2022
9340f72
✨ feat(Add): Add new button (#1449)
mcayuelas-ledger Oct 4, 2022
6fe4cde
Feat / LIVE-3666 - New homepage tab navigator (#1462)
nparigi-ledger Oct 4, 2022
ba9b9bf
✨ FlatList with NFTs and Add new button (#1458)
mcayuelas-ledger Oct 5, 2022
e5336e3
Feat/LIVE-3667 - Tabs analytics (#1469)
nparigi-ledger Oct 5, 2022
086c65f
Feat/LIVE-3670 - Nft gallery list empty state (#1471)
nparigi-ledger Oct 5, 2022
1502f14
✨ Sorted List (#1472)
mcayuelas-ledger Oct 5, 2022
01ece74
Feat/LIVE-3680 + LIVE-3723 - Handle nft gallery list navigation too n…
nparigi-ledger Oct 6, 2022
a63e225
Feat/LIVE-3669 - Nft gallery - Save wallet navigator last visited tab…
nparigi-ledger Oct 7, 2022
2019c40
✨ FEAT: Mock NFT Gallery V0 (#1507)
mcayuelas-ledger Oct 10, 2022
6388cf2
Feat / LIVE-4050 - Static header nft gallery (#1515)
nparigi-ledger Oct 10, 2022
c92d025
✨ FEAT : Add NFT from the Empty State page or the NFT Gallery (#1514)
mcayuelas-ledger Oct 10, 2022
0b702f5
Feat/LIVE-3808 - nft gallery with reborn (#1521)
nparigi-ledger Oct 11, 2022
243961f
♻️ Skelleton as Styled (#1554)
mcayuelas-ledger Oct 12, 2022
f5882b9
Remove mock wait time for getting nft metadata
nparigi-ledger Oct 18, 2022
a2dbe9f
✨ [FEAT]: LLM - Hide whole NFT collection from Individual NFT setting…
mcayuelas-ledger Oct 19, 2022
186ae41
✨ FEAT: LLM - NFT GAllery - ERC-1155 individual NFT display in the N…
mcayuelas-ledger Oct 20, 2022
5507ced
Feat/LIVE-3831 - NFT Gallery - Wallet navigator header animation (#1607)
nparigi-ledger Oct 21, 2022
c40be85
Feat/LIVE-4049 - NFT viewer page design fix (v3) (#1652)
nparigi-ledger Oct 24, 2022
d7e0fed
πŸ’„ Polishing Millestone 2 - NFT gallery (#1655)
mcayuelas-ledger Oct 25, 2022
a6e5d55
βœ… Add firsts Tests for NFT Gallery (#1697)
mcayuelas-ledger Oct 27, 2022
715c835
Feat/LIVE-4284 - Nft Gallery - Put the nft gallery behind a feature f…
nparigi-ledger Oct 28, 2022
407879b
πŸ’„Feat : Pixel Polishing Galery (#1710)
mcayuelas-ledger Oct 28, 2022
580dec0
Feat/LIVE-3665 - Nft gallery pixel polish2 (#1732)
nparigi-ledger Nov 2, 2022
0720607
Merge branch 'develop' of github.com:LedgerHQ/ledger-live into feat/L…
nparigi-ledger Nov 9, 2022
a2fa688
βœ… Add some tests (#1745)
mcayuelas-ledger Nov 9, 2022
2a1f7d6
fix some ts errors
nparigi-ledger Nov 9, 2022
a98c321
Merge branch 'feat/LIVE-3665-nft-gallery-v0' of github.com:LedgerHQ/l…
nparigi-ledger Nov 9, 2022
fa792a7
merge
nparigi-ledger Nov 10, 2022
ecb1179
Merge branch 'develop' into feat/LIVE-3665-nft-gallery-v0
mcayuelas-ledger Nov 10, 2022
b8dd425
Merge branch 'develop' of github.com:LedgerHQ/ledger-live into feat/L…
nparigi-ledger Nov 10, 2022
fe1717d
Feat/LIVE-3665 - Nft gallery improve header ios (#1816)
nparigi-ledger Nov 15, 2022
11597ff
Feat/LIVE-4541 - Nft gallery - UI glitch on update firmware banner (#…
nparigi-ledger Nov 15, 2022
bbd9c41
Feat/LIVE-4595 - NFT gallery put back pull to refresh on portfolio sc…
nparigi-ledger Nov 16, 2022
a0c50d8
Merge branch 'develop' of github.com:LedgerHQ/ledger-live into feat/L…
nparigi-ledger Nov 16, 2022
2108b34
try putting back pnpm lock file from develop to fix CI
nparigi-ledger Nov 17, 2022
345e2d4
try updating pnpm lock file
nparigi-ledger Nov 17, 2022
add2db2
Merge branch 'develop' of github.com:LedgerHQ/ledger-live into feat/L…
nparigi-ledger Nov 17, 2022
74732fc
Add changesets, add new feature flag to types-lives readme
nparigi-ledger Nov 17, 2022
2e35a91
try fix ts
nparigi-ledger Nov 17, 2022
4b622df
chore(🍏): regenerate podfile
ledgerlive Nov 17, 2022
737b118
retriger ci
nparigi-ledger Nov 17, 2022
f2d3b75
Merge branch 'develop' of github.com:LedgerHQ/ledger-live into feat/L…
nparigi-ledger Nov 18, 2022
9c38cea
πŸ“ˆ LLM - LIVE-4629: Track analytics On NFT Gallery (#1876)
mcayuelas-ledger Nov 18, 2022
b915269
Feat/LIVE-4627/LIVE-4607/LIVE-4615 - Wallet NFt Gallery misc display …
nparigi-ledger Nov 21, 2022
c53221a
Merge branch 'develop' of github.com:LedgerHQ/ledger-live into feat/L…
nparigi-ledger Nov 21, 2022
d95aaa3
Merge branch 'develop' of github.com:LedgerHQ/ledger-live into feat/L…
nparigi-ledger Nov 21, 2022
a29e3ba
πŸ› Fix nfts attribute in generate mocks
mcayuelas-ledger Nov 21, 2022
bcddf6a
force retriger ci
nparigi-ledger Nov 21, 2022
c6cb883
don't nfts even if undefined
nparigi-ledger Nov 21, 2022
46caab2
ledgerjs lint fix
nparigi-ledger Nov 21, 2022
eee9681
Merge branch 'develop' of github.com:LedgerHQ/ledger-live into feat/L…
nparigi-ledger Nov 21, 2022
a3731a3
Merge branch 'develop' of github.com:LedgerHQ/ledger-live into feat/L…
nparigi-ledger Nov 21, 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
5 changes: 5 additions & 0 deletions .changeset/dry-squids-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ledgerhq/live-common": minor
---

Add new NFT helpers used for the NFT Gallery (orderByLastReceived, groupByCurrency, getNFTByTokenId), add mock NFT account
5 changes: 5 additions & 0 deletions .changeset/olive-coins-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": minor
---

Add NFT Gallery
5 changes: 5 additions & 0 deletions .changeset/thin-windows-behave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ledgerhq/types-live": minor
---

Add walletNftGallery feature flag, to control display of the new NFT Gallery
7 changes: 7 additions & 0 deletions apps/ledger-live-mobile/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ module.exports = {
"error",
{ devDependencies: ["e2e/**"] },
],
// For Link component from native-ui, that is interpreted like a html link, and thus this rule tried to impose a href prop on it
"jsx-a11y/anchor-is-valid": [
"error",
{
components: [],
},
],

// New rules from default RN 0.61 ruleset
// that were triggered in our codebase
Expand Down
44 changes: 22 additions & 22 deletions apps/ledger-live-mobile/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,9 @@ PODS:
- react-native-adjust (4.29.6):
- Adjust (= 4.29.6)
- React
- react-native-appboy-sdk (1.39.0):
- Appboy-iOS-SDK (~> 4.5.0)
- React
- react-native-appboy-sdk (1.40.0):
- Appboy-iOS-SDK (~> 4.5.1)
- React-Core
- react-native-biometrics (3.0.1):
- React-Core
- react-native-ble-plx (2.0.3):
Expand All @@ -448,7 +448,7 @@ PODS:
- React-Core
- react-native-netinfo (6.2.1):
- React-Core
- react-native-pager-view (6.0.2):
- react-native-pager-view (6.1.0):
- React-Core
- react-native-performance (3.1.2):
- React-Core
Expand Down Expand Up @@ -609,7 +609,7 @@ PODS:
- RNSentry (4.2.4):
- React-Core
- Sentry (= 7.23.0)
- RNShare (7.9.1):
- RNShare (7.9.0):
- React-Core
- RNSVG (12.3.0):
- React-Core
Expand All @@ -621,14 +621,14 @@ PODS:
- SDWebImageWebPCoder (0.8.5):
- libwebp (~> 1.0)
- SDWebImage/Core (~> 5.10)
- segment-analytics-react-native (2.9.0):
- segment-analytics-react-native (2.9.1):
- React-Core
- sovran-react-native
- Sentry (7.23.0):
- Sentry/Core (= 7.23.0)
- Sentry/Core (7.23.0)
- SocketRocket (0.6.0)
- sovran-react-native (0.4.4):
- sovran-react-native (0.4.5):
- React-Core
- Storyly (1.26.2)
- storyly-react-native (1.26.2):
Expand Down Expand Up @@ -703,7 +703,7 @@ DEPENDENCIES:
- "React-jsinspector (from `../../../node_modules/.pnpm/react-native@0.68.5_qiqqwmyv63yhnuboofexv3s7x4/node_modules/react-native/ReactCommon/jsinspector`)"
- "React-logger (from `../../../node_modules/.pnpm/react-native@0.68.5_qiqqwmyv63yhnuboofexv3s7x4/node_modules/react-native/ReactCommon/logger`)"
- "react-native-adjust (from `../../../node_modules/.pnpm/react-native-adjust@4.29.6/node_modules/react-native-adjust`)"
- "react-native-appboy-sdk (from `../../../node_modules/.pnpm/react-native-appboy-sdk@1.39.0/node_modules/react-native-appboy-sdk`)"
- "react-native-appboy-sdk (from `../../../node_modules/.pnpm/react-native-appboy-sdk@1.40.0/node_modules/react-native-appboy-sdk`)"
- "react-native-biometrics (from `../../../node_modules/.pnpm/react-native-biometrics@3.0.1_react-native@0.68.5/node_modules/react-native-biometrics`)"
- "react-native-ble-plx (from `../../../node_modules/.pnpm/react-native-ble-plx@2.0.3/node_modules/react-native-ble-plx`)"
- "react-native-config (from `../../../node_modules/.pnpm/react-native-config@1.4.4/node_modules/react-native-config`)"
Expand All @@ -712,7 +712,7 @@ DEPENDENCIES:
- "react-native-image-crop-tools (from `../../../node_modules/.pnpm/react-native-image-crop-tools@1.6.2_ykxjy5s7xujdxmsgrwxo5mh3y4_ondxtwf5lqq5g76dzmsmwamaca/node_modules/react-native-image-crop-tools`)"
- "react-native-image-picker (from `../../../node_modules/.pnpm/react-native-image-picker@4.8.5_ondxtwf5lqq5g76dzmsmwamaca/node_modules/react-native-image-picker`)"
- "react-native-netinfo (from `../../../node_modules/.pnpm/@react-native-community+netinfo@6.2.1_react-native@0.68.5/node_modules/@react-native-community/netinfo`)"
- "react-native-pager-view (from `../../../node_modules/.pnpm/react-native-pager-view@6.0.2_ondxtwf5lqq5g76dzmsmwamaca/node_modules/react-native-pager-view`)"
- "react-native-pager-view (from `../../../node_modules/.pnpm/react-native-pager-view@6.1.0_ondxtwf5lqq5g76dzmsmwamaca/node_modules/react-native-pager-view`)"
- "react-native-performance (from `../../../node_modules/.pnpm/react-native-performance@3.1.2_react-native@0.68.5/node_modules/react-native-performance`)"
- "react-native-randombytes (from `../../../node_modules/.pnpm/react-native-randombytes@3.6.1/node_modules/react-native-randombytes`)"
- "react-native-restart (from `../../../node_modules/.pnpm/react-native-restart@0.0.24_ondxtwf5lqq5g76dzmsmwamaca/node_modules/react-native-restart`)"
Expand Down Expand Up @@ -750,11 +750,11 @@ DEPENDENCIES:
- "RNReanimated (from `../../../node_modules/.pnpm/react-native-reanimated@2.8.0_ng25wgrbxfbuobm4i4zjlzcppu/node_modules/react-native-reanimated`)"
- "RNScreens (from `../../../node_modules/.pnpm/react-native-screens@3.13.1_ondxtwf5lqq5g76dzmsmwamaca/node_modules/react-native-screens`)"
- "RNSentry (from `../../../node_modules/.pnpm/@sentry+react-native@4.2.4_ondxtwf5lqq5g76dzmsmwamaca/node_modules/@sentry/react-native`)"
- "RNShare (from `../../../node_modules/.pnpm/react-native-share@7.9.1/node_modules/react-native-share`)"
- "RNShare (from `../../../node_modules/.pnpm/react-native-share@7.9.0/node_modules/react-native-share`)"
- "RNSVG (from `../../../node_modules/.pnpm/react-native-svg@12.3.0_ondxtwf5lqq5g76dzmsmwamaca/node_modules/react-native-svg`)"
- "RNVectorIcons (from `../../../node_modules/.pnpm/react-native-vector-icons@8.1.0/node_modules/react-native-vector-icons`)"
- "segment-analytics-react-native (from `../../../node_modules/.pnpm/@segment+analytics-react-native@2.9.0_ondxtwf5lqq5g76dzmsmwamaca/node_modules/@segment/analytics-react-native`)"
- "sovran-react-native (from `../../../node_modules/.pnpm/@segment+sovran-react-native@0.4.4_ondxtwf5lqq5g76dzmsmwamaca/node_modules/@segment/sovran-react-native`)"
- "segment-analytics-react-native (from `../../../node_modules/.pnpm/@segment+analytics-react-native@2.9.1_ondxtwf5lqq5g76dzmsmwamaca/node_modules/@segment/analytics-react-native`)"
- "sovran-react-native (from `../../../node_modules/.pnpm/@segment+sovran-react-native@0.4.5_ondxtwf5lqq5g76dzmsmwamaca/node_modules/@segment/sovran-react-native`)"
- "storyly-react-native (from `../../../node_modules/.pnpm/storyly-react-native@1.26.2_ondxtwf5lqq5g76dzmsmwamaca/node_modules/storyly-react-native`)"
- "TcpSockets (from `../../../node_modules/.pnpm/react-native-tcp@4.0.0_frdjcnsdohx4blxdmaawwvdihy_react-native@0.68.5/node_modules/react-native-tcp`)"
- "Yoga (from `../../../node_modules/.pnpm/react-native@0.68.5_qiqqwmyv63yhnuboofexv3s7x4/node_modules/react-native/ReactCommon/yoga`)"
Expand Down Expand Up @@ -862,7 +862,7 @@ EXTERNAL SOURCES:
react-native-adjust:
:path: "../../../node_modules/.pnpm/react-native-adjust@4.29.6/node_modules/react-native-adjust"
react-native-appboy-sdk:
:path: "../../../node_modules/.pnpm/react-native-appboy-sdk@1.39.0/node_modules/react-native-appboy-sdk"
:path: "../../../node_modules/.pnpm/react-native-appboy-sdk@1.40.0/node_modules/react-native-appboy-sdk"
react-native-biometrics:
:path: "../../../node_modules/.pnpm/react-native-biometrics@3.0.1_react-native@0.68.5/node_modules/react-native-biometrics"
react-native-ble-plx:
Expand All @@ -880,7 +880,7 @@ EXTERNAL SOURCES:
react-native-netinfo:
:path: "../../../node_modules/.pnpm/@react-native-community+netinfo@6.2.1_react-native@0.68.5/node_modules/@react-native-community/netinfo"
react-native-pager-view:
:path: "../../../node_modules/.pnpm/react-native-pager-view@6.0.2_ondxtwf5lqq5g76dzmsmwamaca/node_modules/react-native-pager-view"
:path: "../../../node_modules/.pnpm/react-native-pager-view@6.1.0_ondxtwf5lqq5g76dzmsmwamaca/node_modules/react-native-pager-view"
react-native-performance:
:path: "../../../node_modules/.pnpm/react-native-performance@3.1.2_react-native@0.68.5/node_modules/react-native-performance"
react-native-randombytes:
Expand Down Expand Up @@ -956,15 +956,15 @@ EXTERNAL SOURCES:
RNSentry:
:path: "../../../node_modules/.pnpm/@sentry+react-native@4.2.4_ondxtwf5lqq5g76dzmsmwamaca/node_modules/@sentry/react-native"
RNShare:
:path: "../../../node_modules/.pnpm/react-native-share@7.9.1/node_modules/react-native-share"
:path: "../../../node_modules/.pnpm/react-native-share@7.9.0/node_modules/react-native-share"
RNSVG:
:path: "../../../node_modules/.pnpm/react-native-svg@12.3.0_ondxtwf5lqq5g76dzmsmwamaca/node_modules/react-native-svg"
RNVectorIcons:
:path: "../../../node_modules/.pnpm/react-native-vector-icons@8.1.0/node_modules/react-native-vector-icons"
segment-analytics-react-native:
:path: "../../../node_modules/.pnpm/@segment+analytics-react-native@2.9.0_ondxtwf5lqq5g76dzmsmwamaca/node_modules/@segment/analytics-react-native"
:path: "../../../node_modules/.pnpm/@segment+analytics-react-native@2.9.1_ondxtwf5lqq5g76dzmsmwamaca/node_modules/@segment/analytics-react-native"
sovran-react-native:
:path: "../../../node_modules/.pnpm/@segment+sovran-react-native@0.4.4_ondxtwf5lqq5g76dzmsmwamaca/node_modules/@segment/sovran-react-native"
:path: "../../../node_modules/.pnpm/@segment+sovran-react-native@0.4.5_ondxtwf5lqq5g76dzmsmwamaca/node_modules/@segment/sovran-react-native"
storyly-react-native:
:path: "../../../node_modules/.pnpm/storyly-react-native@1.26.2_ondxtwf5lqq5g76dzmsmwamaca/node_modules/storyly-react-native"
TcpSockets:
Expand Down Expand Up @@ -1033,7 +1033,7 @@ SPEC CHECKSUMS:
React-jsinspector: eb202e43b3879aba9a14f3f65788aec85d4e1ea9
React-logger: 98f663b292a60967ebbc6d803ae96c1381183b6d
react-native-adjust: 8152efdf7a2e94a85ce427f2096b4167f2824273
react-native-appboy-sdk: 4400ab090eff57f5d4a2381e994ac2fb1f68a0aa
react-native-appboy-sdk: 60b4dbb70486426ccc00cd04ab105f8f9afc83fa
react-native-biometrics: 352e5a794bfffc46a0c86725ea7dc62deb085bdc
react-native-ble-plx: f10240444452dfb2d2a13a0e4f58d7783e92d76e
react-native-config: 72d948053a442779b3178fddd571e37f118ef606
Expand All @@ -1042,7 +1042,7 @@ SPEC CHECKSUMS:
react-native-image-crop-tools: 06b171ac13f1cd520e633a0d190c00f664b4cb79
react-native-image-picker: cd420f97f6ed6ff74fc4686d27dbcfdbd051db91
react-native-netinfo: 3d3769f0d65de15c83a9bf1346f8be71de5a24bf
react-native-pager-view: 592421df0259bf7a7a4fe85b74c24f3f39905605
react-native-pager-view: 7abf89f9834d9a4021b2fb6a5ef2abff570b46fb
react-native-performance: e66c3730f9e463b959dc21ff38fd2c8b8e53ea79
react-native-randombytes: 421f1c7d48c0af8dbcd471b0324393ebf8fe7846
react-native-restart: 45c8dca02491980f2958595333cbccd6877cb57e
Expand Down Expand Up @@ -1080,15 +1080,15 @@ SPEC CHECKSUMS:
RNReanimated: 64573e25e078ae6bec03b891586d50b9ec284393
RNScreens: 40a2cb40a02a609938137a1e0acfbf8fc9eebf19
RNSentry: 7495ba091f09f12902d8cf916024efd99b058efe
RNShare: a5dc3b9c53ddc73e155b8cd9a94c70c91913c43c
RNShare: be91a5c149585affb02c25b351bd07ba927c7006
RNSVG: 302bfc9905bd8122f08966dc2ce2d07b7b52b9f8
RNVectorIcons: 31cebfcf94e8cf8686eb5303ae0357da64d7a5a4
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d
segment-analytics-react-native: a66ad0fc52b657774ea8b53410f19d14b595ffd2
segment-analytics-react-native: 36a0e668c91fe9dc35a31079493d504c45ebf8d8
Sentry: a0d4563fa4ddacba31fdcc35daaa8573d87224d6
SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
sovran-react-native: 5f9715a62b50008d72c0cf904cb08c8377777b62
sovran-react-native: fd3dc8f1a4b14acdc4ad25fc6b4ac4f52a2a2a15
Storyly: 9f7694d816cbe22d1d5604b7653e75feabf1915f
storyly-react-native: 2e2e21c3b8d966327659948ab1bed55e1e05127c
TcpSockets: 4ef55305239923b343ed0a378b1fac188b1373b0
Expand Down
8 changes: 4 additions & 4 deletions apps/ledger-live-mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"@react-navigation/bottom-tabs": "^6.4.0",
"@react-navigation/devtools": "^6.0.10",
"@react-navigation/elements": "^1.3.6",
"@react-navigation/material-top-tabs": "^6.2.4",
"@react-navigation/material-top-tabs": "^6.3.0",
"@react-navigation/native": "^6.0.13",
"@react-navigation/stack": "^6.3.1",
"@segment/analytics-react-native": "^2.9.0",
Expand Down Expand Up @@ -160,7 +160,7 @@
"react-native-modal": "^13.0.0",
"react-native-navigation-bar-color": "^2.0.1",
"react-native-os": "^1.2.6",
"react-native-pager-view": "^6.0.0",
"react-native-pager-view": "^6.0.1",
"react-native-qrcode-svg": "6.1.1",
"react-native-randombytes": "^3.6.1",
"react-native-reanimated": "^2.8.0",
Expand All @@ -172,14 +172,14 @@
"react-native-slider": "^0.11.0",
"react-native-splash-screen": "3.2.0",
"react-native-svg": "^12.1.1",
"react-native-tab-view": "3.1.1",
"react-native-tab-view": "^3.3.0",
"react-native-tcp": "^4.0.0",
"react-native-text-input-mask": "^3.1.4",
"react-native-udp": "^4.1.4",
"react-native-url-polyfill": "^1.3.0",
"react-native-vector-icons": "^8.1.0",
"react-native-version-number": "^0.3.6",
"react-native-video": "^5.2.0",
"react-native-video": "5.2.0",
"react-native-webview": "^11.17.1",
"react-redux": "^7.2.9",
"redux": "^4.1.2",
Expand Down
13 changes: 13 additions & 0 deletions apps/ledger-live-mobile/src/actions/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ import {
SettingsUnhideNftCollectionPayload,
SettingsUpdateCurrencyPayload,
SettingsActionTypes,
SettingsSetWalletTabNavigatorLastVisitedTabPayload,
} from "./types";
import { WalletTabNavigatorStackParamList } from "../components/RootNavigator/types/WalletTabNavigator";

// FIXME: NEVER USED BY ANYONE, DROP ?
const setExchangePairsAction = createAction<SettingsSetPairsPayload>(
Expand Down Expand Up @@ -447,6 +449,17 @@ export const setNotifications = (
notifications,
});

const setWalletTabNavigatorLastVisitedTabAction =
createAction<SettingsSetWalletTabNavigatorLastVisitedTabPayload>(
SettingsActionTypes.WALLET_TAB_NAVIGATOR_LAST_VISITED_TAB,
);
export const setWalletTabNavigatorLastVisitedTab = (
walletTabNavigatorLastVisitedTab: keyof WalletTabNavigatorStackParamList,
) =>
setWalletTabNavigatorLastVisitedTabAction({
walletTabNavigatorLastVisitedTab,
});

const dangerouslyOverrideStateAction =
createAction<SettingsDangerouslyOverrideStatePayload>(
SettingsActionTypes.DANGEROUSLY_OVERRIDE_STATE,
Expand Down
5 changes: 5 additions & 0 deletions apps/ledger-live-mobile/src/actions/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ export enum SettingsActionTypes {
SET_FIRST_CONNECTION_HAS_DEVICE = "SET_FIRST_CONNECTION_HAS_DEVICE",
SET_NOTIFICATIONS = "SET_NOTIFICATIONS",
RESET_SWAP_LOGIN_AND_KYC_DATA = "RESET_SWAP_LOGIN_AND_KYC_DATA",
WALLET_TAB_NAVIGATOR_LAST_VISITED_TAB = "WALLET_TAB_NAVIGATOR_LAST_VISITED_TAB",
}

export type SettingsImportPayload = Partial<SettingsState>;
Expand Down Expand Up @@ -377,6 +378,10 @@ export type SettingsSetFirstConnectHasDeviceUpdatedPayload = Pick<
export type SettingsSetNotificationsPayload = {
notifications: Partial<SettingsState["notifications"]>;
};
export type SettingsSetWalletTabNavigatorLastVisitedTabPayload = Pick<
SettingsState,
"walletTabNavigatorLastVisitedTab"
>;
export type SettingsDangerouslyOverrideStatePayload = State;
export type SettingsPayload =
| SettingsImportPayload
Expand Down
48 changes: 48 additions & 0 deletions apps/ledger-live-mobile/src/components/Nft/AddNewItemList.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { Flex, Icons, Text } from "@ledgerhq/native-ui";
import React from "react";
import { useTranslation } from "react-i18next";
import { useTheme } from "styled-components/native";
import { TouchableOpacity } from "react-native";
import styled from "@ledgerhq/native-ui/components/styled";
import ReceiveNFTsModal from "../../screens/Nft/NftGallery/ReceiveNFTsModal";
import { useReceiveNFTsModal } from "../../screens/Nft/NftGallery/ReceiveNFTsModal.hook";

const StyledTouchableOpacity = styled(TouchableOpacity)`
background-color: ${props => props.theme.colors.background.main};
margin-bottom: 8;
border-radius: 8;
height: 160;
border-width: 1;
border-color: ${props => props.theme.colors.neutral.c60};
border-style: dashed;
flex-direction: column;
align-items: center;
justify-content: center;
`;

export const AddNewItem = () => {
const { colors } = useTheme();
const { t } = useTranslation();

const { openModal, closeModal, isModalOpened } = useReceiveNFTsModal();

return (
<StyledTouchableOpacity onPress={openModal}>
<Flex flexDirection="column" alignItems="center" justifyContent="center">
<Icons.PlusMedium size={24} color={colors.neutral.c100} />
<Text
variant="body"
fontWeight="semiBold"
color={colors.neutral.c100}
mt={2}
fontSize={14}
lineHeight="18px"
>
{t("nft.gallery.addNew")}
</Text>
</Flex>

<ReceiveNFTsModal isOpened={isModalOpened} onClose={closeModal} />
</StyledTouchableOpacity>
);
};
Loading