Compare commits

...
Author SHA1 Message Date
tumanov-alex 6a40a7e3bb Init 2023-11-02 17:29:22 +01:00
flexsurfer e6068fd4c1 small ns changes (#17793) 2023-11-02 14:23:34 +01:00
Yevheniia Berdnyk 579b382c44 e2e: fix for edit message with a mention 2023-11-02 12:38:26 +02:00
yqrashawnandpavloburykh 859cb19886 fix(universal-link): more new link format, handle old link format (#17721)
Co-authored-by: pavloburykh <pavlo@status.im>
2023-11-02 15:31:49 +08:00
Omar Basem 2d92b515b8 Documentation: composer (#17756)
* Docs: composer
2023-11-02 08:53:22 +04:00
Icaro Motta 972e1eee01 Composer - Fix conflicting touchable and gesture (#17680)
Fix the unreliable swipe behavior of link previews in the chat composer. In many
occasions, we noticed the horizontal scroll wasn't being triggered properly or
not at all. In other occasions, the swipe gesture would incorrectly register a
press on the parent `Touchable` component.

Fixes https://github.com/status-im/status-mobile/issues/16599
2023-11-01 13:31:14 -03:00
Ibrahem Khalil 6c2b437e62 Follow up to fix color picker on wallet (#17748) 2023-11-01 15:18:53 +02:00
Nikolay 94a3e266a9 Edit derivation path (#17741) 2023-11-01 14:04:21 +01:00
Lungu Cristian 716007dc3c fix: removed bounce from lightbox text-sheet (#17664)
fix: improving UI and gestures

fix: expanding on press now works reliably

fix: center text and disable gestures for short messages

feat: added styling for one-lined messages

fix: small opacity fix

ref: small condition change

fix: horizontal swiping being unreliable with vertical scrolling

ref: reusing shared value from lightbox animations

fix: text-sheet bottom gradient not visible on android

fix: addressed qa issues 1,2,4

fix: zoomable-image stuck if moved vertically when full screen

clean: removed unused var

chore: removed unused require

fix: don't allow returning text-sheet down and up in one move

fix: text-sheet bar styling was wrong

fix: adjusted gradient animation with designs

fix: text-sheet bar opacity
2023-11-01 13:20:10 +02:00
Mohsen 233d1b3261 [#17288] refactor: migrate previews to new api (#17776) 2023-11-01 11:31:32 +03:00
Yevheniia Berdnyk 25381b601f e2e: test for sending image with camera 2023-10-31 23:23:04 +02:00
Ulises Manuel 4a874ce48d [#17023] Share qr code variants (#17736)
* Align docstring

* Create share-qr-code component

* Remove empty style file

* Implement common.share-qr-code including call to media server

* Add share-qr-code preview screen

* Use share-qr-code component in shell's share screen

* Add tests and some fixes
2023-10-31 12:35:28 -06:00
mmilad75 ca822ff51d Connect Wallet Home Page to backend - Accounts card (#17447)
* add functionality

* fix lint issues

* change class component to functional component

* fix refactor-data function

* rename events and fix reagent-render structure

* change rf/defn to re-frame/reg-event-fx

* convert camelCase to kebab-case

* refactor on-error callback

* refactor on-success callback

* replace merge with assoc and conj

* refactor calculate-balance structure

* rename reagent-render

* move calculate-balance into a sub

* use created sub in the view

* fix lint issues

* move calculate-balance function to wallet sub

* change on-success callback

* revert podfile.lock

* remove extra line

* add template for test

* edit calculate-balance and calculate-raw-balance

* add tests

* revert podfile.lock and fix lint issues

* rename refactor-data

* add toFixed to get-balance

* fix lint issues

* finalize code

* replace re-frame/reg-event-fx with rf/defn

* resolve comments

* remove use-fixtures in the test

* break down calculate-balance

* fix lint issues

* fix placeholder color

* move accounts to view-internal

* remove accounts param in wallet-2/get-wallet-token

* Connect Wallet Account Page to backend (basic) (#17700)

* pass address to wallet-accounts screen

* move get-balance-by-address to common/utils

* add functionality

* fix lint issues

* move logic to sub

* convert filter+first to some

* change code structure

* rename wallet-2 to wallet

* add tests

* fix lint issues

* fix style

* remove unused code

* remove view-internal defn

* fix lint issues

* fix networks param issue

* fix .toFixed issue
2023-10-31 21:48:21 +03:30
Yevheniia Berdnyk 88b3d7d2e6 e2e: fix for app closed after closing gallery 2023-10-31 12:04:46 +02:00
Yevheniia Berdnyk 90d3a5a39d e2e: test fixes 2023-10-31 02:21:52 +02:00
Mohamed Javid dd8beeb848 [Fix] "network-routing" component test (#17760)
This commit moves the "network-routing" component test to the quo ns from quo2 ns.

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-10-30 20:51:31 +05:30
Ajay Sivan abbf29d4ca Remove all status-im.ui.components.react usages in status-im2 (#17750) 2023-10-30 06:37:28 -07:00
Parvesh Monu cebec10aa5 fix bottom message in the chat history is hidden behind the composer with an image in it (#17757) 2023-10-30 15:46:16 +05:30
Smoothieewastaken 55b233c528 docs: Fixed typos (#17749) 2023-10-30 08:06:52 +01:00
Omar Basem 68ad4fe086 Wallet: Address Text (#17732)
* Wallet: address text
2023-10-30 09:40:39 +04:00
Jamie Caprani 06c31f3a12 chore: add sub to get network info (#17650) 2023-10-27 03:54:58 -07:00
Lungu Cristian 954373105d Visual debugging of components (#17729)
* feat: debug/show components from the REPL

* ref: some renames and cleanup

* chore: removed comments/imports

* feat: added remount on every eval & small changes

* doc: added tip to debugging doc

* doc: formatting

* doc: more formatting

* fix: fixed docs and other review comments

* fix: moved & renamed into the dev.component-preview ns

* style: adjusted debugging readme spacing

* fix: removed trailing line
2023-10-27 13:14:01 +03:00
Mohsen 2aeafa30bd [#17423] fix: update sync flow (#17731) 2023-10-27 11:16:56 +03:00
Parvesh Monu 5920c35677 Fixed Some Grammatical Errors in README.md (#17716)
Author: Janumala Akhilendra <82641474+JanumalaAkhilendra@users.noreply.github.com>
2023-10-27 13:17:16 +05:30
Ulises Manuel 1f71883fa4 [#16755] - Network routing component (#17457)
* Add network routing component & animations
* Add basic tests and accessibility labels
2023-10-26 16:07:44 -06:00
Siddarth Kumar c9b3196203 improve make component-test robustness (#17743)
Many times devs run
`make component-test` or `make component-test-watch` when there is already a metro or clojure terminal running on their system.

This causes weird behaviour and it is advised to not run these commands together.

This commit prevents that and shows a warning.
2023-10-26 23:24:23 +05:30
mmilad75 6ebd5b421c Fix account-card component UI (#17589)
* add new type

* fix lint issues

* add tests

* refactor get-test-data function

* resolve comments

* fix imports

* resolve comments

* fix lint issues

* remove extra code

* fix height
2023-10-26 16:46:24 +03:30
Ibrahem Khalil 901644e023 Make color selector take full 0device width to match Figma and add dynamic width (#17465) 2023-10-26 13:20:40 +03:00
Mohsen df256bf2b4 [#17534] fix: Add contact scan QR screen back handler issue (#17694) 2023-10-26 12:38:47 +03:00
Jamie Caprani 56492949f1 feat (wallet): add ability to create new account (#17496) 2023-10-26 01:45:33 -07:00
frank ab2ad0ec12 Don't sync AC notifications, only decisions/state (#17600)
* fix outgoing contact request state not show correctly

* update status-go-version.json
2023-10-26 14:44:06 +08:00
Ibrahem Khalil fe2272b703 Fix Composer not focusing on edit/reply (#17640) 2023-10-26 05:43:49 +03:00
Icaro Motta c0b21aa315 Document how to auto-format Clojure files in VSCode with zprint (#17719)
Document how a VSCode user can configure their editor to auto-format
Clojure(Script) files that respect all the formatter (zprint) settings specified
in status-mobile/.zprintrc.

The result should be that on every file save, the file should be identically
formatted as if you used make lint-fix, at least the part about zprint. If
lint-fix does other things now or in the future that are outside the scope of
zprint, those won't be covered by the VSCode extension.
2023-10-25 23:19:56 -03:00
Nikolay 876b020a32 Token network component (#17667) 2023-10-25 13:35:42 -07:00
Mohsen 8ed7059aa9 [#17230] fix: fetch group member info (#17726) 2023-10-25 21:26:34 +03:00
Omar Basem 125c117bac wallet: token value drawer (#17730)
* wallet: token value drawer
2023-10-25 15:45:45 +04:00
Parvesh Monu 078976806a Don't display "Add Unknown as contact to send a Message" if chat is not loaded (#17704) 2023-10-25 16:38:01 +05:30
Omar Basem 07dd42a7d3 Wallet: Network Preferences drawer (#17710)
* Wallet: Network Preferences drawer
2023-10-25 14:55:17 +04:00
Ajay Sivan 3197adf855 Refactor tag preview screens to new api (#17549) 2023-10-25 03:19:37 -07:00
Ibrahem Khalil 8296bda85b Fix recent album not showing count (#17498) 2023-10-24 17:23:16 +03:00
flexsurfer ca2b3abb1c old wallet fixes (#17697) 2023-10-24 15:36:10 +03:00
Ibrahem Khalil b910f05286 Update react-native-camera-kit to latest beta to enable programmitcal zooming (#17708) 2023-10-24 11:48:36 +03:00
Mohsen c42fc5153d [#17288] refactor: migrate previews to new api (#17695) 2023-10-23 20:40:22 +03:00
codemaster 221c501279 fix: remove qa-only features(unicorn, skull) (#17594) 2023-10-23 22:33:09 +10:00
diana 071d8f0925 e2e: new link format 2023-10-23 11:26:53 +02:00
234 changed files with 4662 additions and 2462 deletions
+12
View File
@@ -0,0 +1,12 @@
{
"editor.formatOnSave": true,
"clojure.format.enable": false,
"[clojure]": {
"editor.defaultFormatter": "rflagreca.vscode-clj-zprint"
},
"vscode-clj-zprint.IgnoreExternalFiles": false,
"vscode-clj-zprint.CommunityFormatting": false,
"vscode-clj-zprint.OptionsMap": "",
"vscode-clj-zprint.width": "",
"vscode-clj-zprint.Styles.UseOnlyTheseStyles": false
}
+2
View File
@@ -362,6 +362,7 @@ component-test-watch: export TARGET := clojure
component-test-watch: export COMPONENT_TEST := true
component-test-watch: export BABEL_ENV := test
component-test-watch: ##@ Watch tests and re-run no changes to cljs files
@@scripts/check-metro-shadow-process.sh
rm -rf ./component-spec
yarn install
nodemon --exec 'yarn shadow-cljs compile component-test && jest --config=test/jest/jest.config.js' -e cljs
@@ -370,6 +371,7 @@ component-test: export TARGET := clojure
component-test: export COMPONENT_TEST := true
component-test: export BABEL_ENV := test
component-test: ##@test Run component tests once in NodeJS
@scripts/check-metro-shadow-process.sh
rm -rf ./component-spec
yarn install
yarn shadow-cljs compile component-test && \
+8 -8
View File
@@ -6,7 +6,7 @@
[Get it on Github](https://github.com/status-im/status-mobile/releases)
Join us in creating a browser, messenger, and gateway to a decentralized world. Status is a free (libre) open source mobile client targeting Android & iOS built entirely on [Ethereum](https://ethereum.org/) technologies. That's right, no middle men and `go-ethereum` running directly on your device.
Join us in creating a browser, messenger, and gateway to a decentralized world. Status is a free (libre) open source mobile client targeting Android & iOS built entirely on [Ethereum](https://ethereum.org/) technologies. That's right, no middlemen and `go-ethereum` running directly on your device.
[![Getting started with Status](https://i.imgur.com/C0aZZEL.jpg)](https://www.youtube.com/watch?v=oDCSEmS9c3o "Getting started with Status")
@@ -14,9 +14,9 @@ Join us in creating a browser, messenger, and gateway to a decentralized world.
We believe in a medium of pure free trade, economies with fair, permission-less access and a world without intermediaries. We want to create policies that can exist between friends or scale globally, we want to communicate securely and be uninhibited by legacy systems.
We want to take responsibility for our data, the way we conduct ourselves privately and promote this way of life to a mass audience.
We want to take responsibility for our data, and the way we conduct ourselves privately and promote this way of life to a mass audience.
We want deep insights into our own economies so we can make informed, data-driven decisions on how to make our lives better. The Ethereum blockchain, Smart Contracts, Swarm and Whisper provide us a path forward.
We want deep insights into our own economies so we can make informed, data-driven decisions on how to make our lives better. The Ethereum blockchain, Smart Contracts, Swarm and Whisper provide us with a path forward.
If this interests you, **help us make Status a reality** - anyone can contribute and we need everyone at any skill level to participate.
@@ -37,26 +37,26 @@ project dependencies, coding guidelines and testing procedures.
Check out our [coding guidelines](doc/new-guidelines.md).
- **Community Management**
Metcalfe's law states that the value of a network is proportional to the square of the number of connected users of the system - without community Status is meaningless. We're looking to create a positive, fun environment to explore new ideas, experiment and grow the Status community. Building a community takes a lot of work but the people you'll meet and long lasting relationships you form will be well worth it, check out our [Mission and Community Principles](https://status.im/about)
Metcalfe's law states that the value of a network is proportional to the square of the number of connected users of the system - without community Status is meaningless. We're looking to create a positive, fun environment to explore new ideas, experiment and grow the Status community. Building a community takes a lot of work but the people you'll meet and the long-lasting relationships you form will be well worth it, check out our [Mission and Community Principles](https://status.im/about)
- **Specification / Documentation**
John Dewey once said "Education is not preparation for life; education is life *itself* ". Developers and Designers need guidance and it all starts from documentation and specifications. Our software is only as good as its documentation, check out our [docs](doc/) and see how you can improve what we have.
John Dewey once said, "Education is not preparation for life; education is life *itself* ". Developers and Designers need guidance and it all starts from documentation and specifications. Our software is only as good as its documentation, check out our [docs](doc/) and see how you can improve what we have.
- **Blog Writing**
Content is King, keeping our blog up to date and informing the community of news helps keep everyone on the same page.
- **Testers**
It's bug hunting season! Status is currently under active development and there is sure to be a bunch of learning, [build status from scratch](doc/starting-guide.md) or if an android user check out our [nightly builds](https://status.im/nightly). You can shake your phone to submit bug reports, or start browsing our [Github Issues](https://github.com/status-im/status-mobile/issues). Every bug you find brings Status closer to stable, usable software for everyone to enjoy!
It's bug-hunting season! Status is currently under active development and there is sure to be a bunch of learning, [build status from scratch](doc/starting-guide.md) or if an android user checks out our [nightly builds](https://status.im/nightly). You can shake your phone to submit bug reports, or start browsing our [Github Issues](https://github.com/status-im/status-mobile/issues). Every bug you find brings Status closer to stable, usable software for everyone to enjoy!
- **Security**
Status is a visual interface to make permanent changes on the Blockchain, it handles crypto-tokens that have real value and allows 3rd party code execution. Security is paramount to its success. You are given permission to break Status as hard as you can, as long as you share your findings with the community!
- **Evangelism**
Help us spread the word! Tell a friend *right now*, in fact tell **everyone** - yell from a mountain if you have to, every person counts! If you've got a great story to tell or have some interesting way you've spread the word about Status let us know about it in our [chat](https://join.status.im/chat/public/status)
Help us spread the word! Tell a friend *right now*, in fact, tell **everyone** - yell from a mountain if you have to, every person counts! If you've got a great story to tell or have some interesting way you've spread the word about Status let us know about it in our [chat](https://join.status.im/chat/public/status)
## Give me Binaries!
You can get our Beta builds for both Android and iOS on our [website](https://status.im), through our [nightly builds](https://status.im/nightly/) or by [building it yourself](https://status.im/technical/build_status/).
You can get our Beta builds for both Android and iOS on our [website](https://status.im), through our [nightly builds](https://status.im/nightly/), or by [building it yourself](https://status.im/technical/build_status/).
## Core Contributors
+2 -1
View File
@@ -33,7 +33,8 @@
android:name=".MainApplication"
android:largeHeap="true"
android:usesCleartextTraffic="true"
android:extractNativeLibs="true">
android:extractNativeLibs="true"
android:requestLegacyExternalStorage="true">
<!-- After upgrading Android Gradle Plugin to 4.2.0 and above we must get rid of `extractNativeLibs="true"`
and use`useLegacyPackaging` flag in our app's `build.gradle`-->
<meta-data android:name="commitHash" android:value="${commitHash}"/>
+1 -1
View File
@@ -22,7 +22,7 @@
# Version requirements used throughout the Gradle scripts
kotlinVersion=1.6.20
minSdkVersion=23
minSdkVersion=24
compileSdkVersion=31
targetSdkVersion=31
buildToolsVersion=31.0.0
+35
View File
@@ -99,3 +99,38 @@ Also to inspect logs in a more flexible manner, instead of the strict output fro
adb logcat | grep 'ReactNativeJS\|StatusModule\|GoLog'
```
### From @clauxx (visual debugging):
When building/fixing/refactoring components, it can be annoying to set-up the component for instant visual feedback (i.e. finding it in the UI when fixing/refactoring; finding a place for it when building from scratch). Very often if the location of the screen containing your component nested deeply in the app, you might have to do a lot of repeated navigation, nevermind logging in every time the app reloads (even with fast refresh disabled this happens quite often).
To alleviate this discomfort and make the development cycle more *pleasant*, you can use one of the following options (*_both of which involve the ... REPL ༼ つ ╹ ╹ ༽つ, so make sure you have that set-up with your IDE/editor_*)
#### REPL-ing to a screen
This one is straightforward, just evaluate a navigation dispatch form from anywhere:
```cljs
(comment (rf/dispatch [:navigate-to :your-favorite-buggy-screen]))
```
> TIP: you can run this from an untracked user namespace `(ns user)`, from which you can experiment or interact with the REPL. This is where I usually keep my development navigation forms.
#### REPL-ing a component
This is also straighforward, but there are some small differences. Just like above, we only have to evaluate a dispatch form, as follows:
```cljs
;; example debugging a quo component, although it could be any other component e.g. from the `status-im2` ns.
(comment (re-frame/dispatch [:dev/preview-component
[quo/slide-button
{:track-icon :face-id
:track-text "preview component example"
:customization-color :blue
:on-complete identity}]]))
```
When evaluated, a full-screen bottom sheet will appear with your component inside. You can make changes to the props or the component internals and re-evaluate the changed forms, after which the component will be re-mounted without running a reload (unless you save the file). Other times it's quicker to just hit save and the component will be reloaded as usual (except for the props you evaluated, which have to be re-evaluated when changed).
> TIP: You can have multiple versions of the component as separate comments to check for the component variations
> TIP: You can leave `comment` blocks at the end of component files (other than quo, since can be previewed in other ways) with usages of components, which other developers can use for visualisation/testing.
@@ -18,7 +18,7 @@ While neat in theory, it has some serious downsides:
As a result of that, more dynamic/state requiring things (like the live tx detail in `/send` command messages) were very hard to do,
so instead of "eating our own dogfood", we decided to side-step the API and implement such things as hard-coded logic in the app, while partly
retaining the js code for "easier" things (like parameter declaration).
Needles to say, such efforts produced code of very poor quality, riddling our app with hard-coded "magic" everywhere in the codebase, completly
Needles to say, such efforts produced code of very poor quality, riddling our app with hard-coded "magic" everywhere in the codebase, completely
defeating the point of "dogfooding" while still requiring more effort and being much more error prone (no way to unit test jail logic) because
of the need to asynchronously communicate with jail for leftover logic in command messages (the parts not hardcoded in app).
+1 -1
View File
@@ -13,7 +13,7 @@ accepted
There was a generally dissatisfaction with our PR flow process from multiple stakeholders, including devs, QA and design. These largely centered around size, speed of integration and quality of PRs.
For more details, please see pain points in the meeting notes held end of February here: https://notes.status.im/C5pj8g7gQOu9Wo8PtDZsMw?edit# as well as the preceeding Discuss thread: https://discuss.status.im/t/better-pull-requests-process/1044
For more details, please see pain points in the meeting notes held end of February here: https://notes.status.im/C5pj8g7gQOu9Wo8PtDZsMw?edit# as well as the preceding Discuss thread: https://discuss.status.im/t/better-pull-requests-process/1044
Also see conversations in Core Dev Call #12 and #13: https://github.com/status-im/pm/
+3 -3
View File
@@ -18,7 +18,7 @@ The whitepaper also proposes that the deposit is only forfeited to the recipient
Considering:
- the absence of efficient ways to perform anonymous transactions (zk-snarks could be used in the future for that)
- the impossibility to prove that a recipient has made an actual reply and not some kind of automated reply (captcha solution was proposed, but wouldn't be pratical until we can use a solution such as swarm feeds that allow users to make free updates to their captcha without on-chain transactions)
- the impossibility to prove that a recipient has made an actual reply and not some kind of automated reply (captcha solution was proposed, but wouldn't be practical until we can use a solution such as swarm feeds that allow users to make free updates to their captcha without on-chain transactions)
- the limited time to develop the feature
We opted for a solution that:
@@ -28,8 +28,8 @@ We opted for a solution that:
## Manifests
Since TtT related informations aren't stored on chain, they need to be stored somewhere else.
For the first iteration of TtT we opted for IPFS, which is already used accross the app for other forms of content, through Infura IPFS gateway.
Since TtT related information aren't stored on chain, they need to be stored somewhere else.
For the first iteration of TtT we opted for IPFS, which is already used across the app for other forms of content, through Infura IPFS gateway.
On IPFS we store what we call a ttt manifest, which is a json file with the following format:
+1 -1
View File
@@ -64,7 +64,7 @@ tests (otherwise some PRs could wait their turn of the scheduled Jenkins job til
## Analysing test results (and why test fails to pass)
After automated test run finished test results could be found in GH comment (if the test suite ran agaist PR) and TestRail. There are two states of the test: Passed and Failed. Test failure happens when certain condition of test step has not met or automated test can not proceed execution because it can not find the respective element on screen it expects should be there.
After automated test run finished test results could be found in GH comment (if the test suite ran against PR) and TestRail. There are two states of the test: Passed and Failed. Test failure happens when certain condition of test step has not met or automated test can not proceed execution because it can not find the respective element on screen it expects should be there.
Several examples of when test fails to succeed:
+47 -22
View File
@@ -17,9 +17,10 @@ You can use any Clojure enabled editor. Here are instructions for developing the
- [REPL!](#repl)
- [Connecting to REPL to IntelliJ](#connecting-to-repl-to-intellij)
- [Connecting REPL and IntelliJ to `status-mobile`](#connecting-repl-and-intellij-to-status-mobile)
- [Using Calva](#using-calva)
- [Start and connect the REPL](#start-and-connect-the-repl)
- [Use the REPL](#use-the-repl)
- [Visual Studio Code](#visual-studio-code)
- [Set up the REPL](#set-up-the-repl)
- [Auto-format files on save](#auto-format-files-on-save)
- [Using Emacs with CIDER](#using-emacs-with-cider)
## Using Cursive
@@ -160,24 +161,24 @@ Following the above should give you the below result:
For additional details on issues you may face when setting up REPL with Cursive [see this document](https://notes.status.im/9Gr7kqF8SzC_SmYK0eB7uQ?view#Connecting-Cursive--IntelliJ-IDEA-to-REPL-Problems)
## Using Calva
## Visual Studio Code
For VS Code users.
### Set up the REPL
0. Install Calva.
1. Install Calva extension.
2. Open the `status-mobile` folder.
3. Start [Status development](starting-guide.md#development) (Starting the
`run-clojure` and `run-metro` jobs in split view in the VS Code integrated
terminal works great).
4. Run the VS Code command: **Calva: Connect to a running REPL Server in the
project**.
- Select the project type `shadow-cljs`.
- Accept the suggested connection `host:port`.
- Select to connect to the `:mobile` build.
### Start and connect the REPL
1. Open the `status-mobile` folder.
1. Start [Status development](starting-guide.md#development) (Starting the `run-clojure` and `run-metro` jobs in split view in the VS Code integrated terminal works great.)
1. Run the VS Code command: **Calva: Connect to a running REPL Server in the project**
1. Select the project type `shadow-cljs`
1. Accept the suggested connection `host:port`
1. Select to connect to the `:mobile` build
### Use the REPL
Open any `.cljs` file in the project and evaluate forms in it. See https://calva.io/try-first/ for some starter tips and links. Confirm that your REPL is connected to the app by evaluating:
Open any `.cljs` file in the project and evaluate forms in it. See
https://calva.io/try-first/ for some starter tips and links. Confirm that your
REPL is connected to the app by evaluating:
```clojure
(js/alert "Hello from Status App!")
@@ -185,9 +186,35 @@ Open any `.cljs` file in the project and evaluate forms in it. See https://calva
🎉 Tada! You are ready to use the REPL to improve Status.im! 🎉
Please consider bookmarking [calva.io](https://calva.io/) for quick access to the Calva documentation.
Consider bookmarking [calva.io](https://calva.io/) for quick access to the Calva
documentation.
## Using Emacs/Cider
### Auto-format files on save
We format Clojure code with [zprint](https://github.com/kkinnear/zprint). We
recommend configuring VSCode to auto-format Clojure files on every save,
otherwise you'll need to constantly rely on the much slower `make lint-fix`
command.
1. Create a file `~/.zprintrc` and enable the `:search-config?` option. This is
necessary so the VSCode extension finds the project's `.zprintrc`.
```bash
echo "{:search-config? true}" > ~/.zprintrc
```
2. Install the extension
[vscode-clj-zprint](https://github.com/rflagreca/vscode-clj-zprint). By the
way, did you know this extension is written in ClojureScript?
3. Copy the recommended settings from our repository in
[.vscode/settings.example.json](/.vscode/settings.example.json) and merge it
with your workspace settings in `.vscode/settings.json`.
The extension `vscode-clj-zprint` is only available for VSCode. If you are using
VSCodium, you'll need to build the `vsix` (extension) yourself (it's easy, only
`yarn` and `vsce` are required).
## Using Emacs with CIDER
1. Install Emacs/Cider/etc. (there is a lot of variability in how to manage things in emacs, so please google for help with this)
2. Add a local ~/.shadow-cljs/config.edn file like below (corresponding to the version numbers of the packages you are using):
@@ -198,5 +225,3 @@ Please consider bookmarking [calva.io](https://calva.io/) for quick access to th
[cider/cider-nrepl "0.28.4"]
[cider/piggieback "0.5.2"]]}
```
+1 -1
View File
@@ -1,7 +1,7 @@
# Patching
## Libraries
If 3rd party library has an issue and fix is not yet released (or we can't switch to a new release), we use forks. Fix should be commited to the fork, tagged and referenced from package.json.
If 3rd party library has an issue and fix is not yet released (or we can't switch to a new release), we use forks. Fix should be committed to the fork, tagged and referenced from package.json.
Example: [`react-native-hole-view`](https://github.com/status-im/react-native-hole-view#refs/tags/v2.1.1-status)
+1 -1
View File
@@ -13,7 +13,7 @@ QA process was focused on account creation and login with keycard, and this bug
## Resolution process
- the commit was reverted locally by the developer which fixed the issue localy and confirmed the faulty commit
- the commit was reverted locally by the developer which fixed the issue locally and confirmed the faulty commit
- the bug was only reproducible on iOS which strongly hinted at a potential issue with native code
- the missing method was not the origin of the problem but was found at this point and further analysis lead to the shadowing error
+7
View File
@@ -75,6 +75,13 @@ abstract_target 'Status' do
# TODO : remove after upgrading to react-native 0.72.x
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', '_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION']
end
# We need to remove the predefinition of IPHONEOS_DEPLOYMENT_TARGET from RNCK lib to use our own.
case target.name
when 'ReactNativeCameraKit'
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end
end
+8 -8
View File
@@ -247,7 +247,7 @@ PODS:
- React-Core
- react-native-blur (4.3.3):
- React-Core
- react-native-cameraroll (4.0.4):
- react-native-cameraroll (5.10.0):
- React-Core
- react-native-config (1.5.0):
- react-native-config/App (= 1.5.0)
@@ -346,7 +346,7 @@ PODS:
- React-perflogger (= 0.69.10)
- ReactNativeAudioToolkit (2.0.3):
- React
- ReactNativeCameraKit (13.0.0):
- ReactNativeCameraKit (14.0.0-beta13):
- React-Core
- ReactNativeNavigation (7.27.1):
- HMSegmentedControl
@@ -468,7 +468,7 @@ DEPENDENCIES:
- react-native-background-timer (from `../node_modules/react-native-background-timer`)
- react-native-blob-util (from `../node_modules/react-native-blob-util`)
- "react-native-blur (from `../node_modules/@react-native-community/blur`)"
- "react-native-cameraroll (from `../node_modules/@react-native-community/cameraroll`)"
- "react-native-cameraroll (from `../node_modules/@react-native-camera-roll/camera-roll`)"
- react-native-config (from `../node_modules/react-native-config`)
- react-native-image-resizer (from `../node_modules/react-native-image-resizer`)
- react-native-lottie-splash-screen (from `../node_modules/react-native-lottie-splash-screen`)
@@ -584,7 +584,7 @@ EXTERNAL SOURCES:
react-native-blur:
:path: "../node_modules/@react-native-community/blur"
react-native-cameraroll:
:path: "../node_modules/@react-native-community/cameraroll"
:path: "../node_modules/@react-native-camera-roll/camera-roll"
react-native-config:
:path: "../node_modules/react-native-config"
react-native-image-resizer:
@@ -723,7 +723,7 @@ SPEC CHECKSUMS:
react-native-background-timer: 1f7d560647b40e6a60b01c452ba29c54bf581fc4
react-native-blob-util: 600972b1782380a5a7d5db61a3817ea32349dae9
react-native-blur: c6d0a1dc2b4b519f7afe3b14d8151998632b6d18
react-native-cameraroll: 88f4e62d9ecd0e1f253abe4f685474f2ea14bfa2
react-native-cameraroll: 4701ae7c3dbcd3f5e9e150ca17f250a276154b35
react-native-config: 5330c8258265c1e5fdb8c009d2cabd6badd96727
react-native-image-resizer: 2f1577efa3bc762597681f530c8e8d05ce0ceeb3
react-native-lottie-splash-screen: 068688c15dd478301fda00f8d87d7fb7d5b9a93e
@@ -750,7 +750,7 @@ SPEC CHECKSUMS:
React-runtimeexecutor: 5ebf1ddaa706bf2986123f22d2cad905443c2c5f
ReactCommon: 65754b8932ea80272714988268bbfb9f303264a5
ReactNativeAudioToolkit: de9610f323e855ac6574be8c99621f3d57c5df06
ReactNativeCameraKit: 9d46a5d7dd544ca64aa9c03c150d2348faf437eb
ReactNativeCameraKit: d95d3e19c514526a234d9f93c6db7e7f10eef9ea
ReactNativeNavigation: 94979dd1572a3f093fc85d4599360530a1bed8c8
RNCAsyncStorage: b2489b49e38c85e10ed45a888d13a2a4c7b32ea1
RNCClipboard: 8148e21ac347c51fd6cd4b683389094c216bb543
@@ -765,7 +765,7 @@ SPEC CHECKSUMS:
RNLanguages: 962e562af0d34ab1958d89bcfdb64fafc37c513e
RNPermissions: ad71dd4f767ec254f2cd57592fbee02afee75467
RNReactNativeHapticFeedback: 2566b468cc8d0e7bb2f84b23adc0f4614594d071
RNReanimated: cf1259a8cf8dfb1d7fa586ce02565fd0610da1d7
RNReanimated: 62e43ee6baafb9ba3d3af1857d7fd23a1d41bff0
RNShare: d82e10f6b7677f4b0048c23709bd04098d5aee6c
RNStaticSafeAreaInsets: 055ddbf5e476321720457cdaeec0ff2ba40ec1b8
RNSVG: 80584470ff1ffc7994923ea135a3e5ad825546b9
@@ -777,6 +777,6 @@ SPEC CHECKSUMS:
TouchID: ba4c656d849cceabc2e4eef722dea5e55959ecf4
Yoga: d24d6184b6b85f742536bd93bd07d69d7b9bb4c1
PODFILE CHECKSUM: 4d710b4207b0fb0f6ecef4aa92bb79b716a7d13c
PODFILE CHECKSUM: 84b749023e1c988c133d7a6ec09d125536e4a4fd
COCOAPODS: 1.12.0
+130 -115
View File
@@ -7932,16 +7932,16 @@
},
{
"path": "com/adobe/xmp/xmpcore/6.0.6",
"path": "com/adobe/xmp/xmpcore/6.1.11",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"xmpcore-6.0.6.pom": {
"sha1": "6a917e15f78165ed31482a339b9c6bd65900ebdd",
"sha256": "sha256-/5kclKMi2JShufIhMW1UXHtH0LP4Uf438vpECHpIoFU="
"xmpcore-6.1.11.pom": {
"sha1": "9f2a56e38f04aa222f8d5436cb07529d80cf89d2",
"sha256": "sha256-cZEYGCECwlM+kqL2fANRAmTmFgVxpzishj51cSQXMj0="
},
"xmpcore-6.0.6.jar": {
"sha1": "fb29d75ac313aed79013505b965d2378a87a9405",
"sha256": "sha256-Qy95ojgKPmW+p1TI0L4MCcaTjfrqH25hsBeEytbBjP8="
"xmpcore-6.1.11.jar": {
"sha1": "852f14101381e527e6d43339d7db1698c970436c",
"sha256": "sha256-j3AzxXm5n6DZ1t3LlEiHW15LV3w1AAInjORpl9Z4tzc="
}
}
},
@@ -8931,16 +8931,16 @@
},
{
"path": "com/drewnoakes/metadata-extractor/2.12.0",
"path": "com/drewnoakes/metadata-extractor/2.18.0",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"metadata-extractor-2.12.0.pom": {
"sha1": "1e3a24770062e3f4d6fb9b9e80b64d7aa4fdb237",
"sha256": "sha256-odxWCuxbZlaa7O5YUqun4F/iEX+660IakMXhyRJV+k4="
"metadata-extractor-2.18.0.pom": {
"sha1": "8a253b5c301e2b71ddb0ad28f3d8656d34f8781f",
"sha256": "sha256-p9E4Id81LFQz1QjswN6KDwSWOE6kggfYEhR8pZgqFZ4="
},
"metadata-extractor-2.12.0.jar": {
"sha1": "30dce2429145a41770e0d2bd0a8e8ba63f2137c8",
"sha256": "sha256-tlzqky+2RNl79mxrfUXmG2lnxyvsISb8PkyD9iWcHQU="
"metadata-extractor-2.18.0.jar": {
"sha1": "fa9fd43a28b10333108c603819810d5176d2b092",
"sha256": "sha256-R4k2H9Bji9skFVS3oMyuIF7SOWl+K3D6nK2t7WmEtWU="
}
}
},
@@ -9545,20 +9545,20 @@
},
{
"path": "com/fasterxml/jackson/core/jackson-annotations/2.15.3",
"path": "com/fasterxml/jackson/core/jackson-annotations/2.16.0-rc1",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"jackson-annotations-2.15.3.pom": {
"sha1": "ff14c9fbeaec5f25b2d61490621477f5197818a2",
"sha256": "sha256-/6ZxZvvkz/NJfQzGKcIBnNDnzV7QG+xoOny/IT0DDsg="
"jackson-annotations-2.16.0-rc1.pom": {
"sha1": "a6e6361e5a7116cc24ae1cfbd76ec384b53fcc64",
"sha256": "sha256-P/CYyUC37b4fTX8mIaaNtNaofqmSlRE5Vsccisl69nI="
},
"jackson-annotations-2.15.3.jar": {
"sha1": "79baf4e605eb3bbb60b1c475d44a7aecceea1d60",
"sha256": "sha256-quhlw9iCVtYbEVI8seiL1I1bmtWFX6H8hZUE/SIEcIo="
"jackson-annotations-2.16.0-rc1.jar": {
"sha1": "0aa7db9c1afcacf3fa2358107f2a82326aa15c64",
"sha256": "sha256-24kpC38tI5Sg8EKNWpb0WprCrt/XMpM7TXdgNvbtWGg="
},
"jackson-annotations-2.15.3.module": {
"sha1": "7be6f491ea5707562778533e030f951c78f9a9b1",
"sha256": "sha256-ZBDJSzk+SU1T1WncQZOnkYeEjdtu48LuHzkkd6IQWcs="
"jackson-annotations-2.16.0-rc1.module": {
"sha1": "6b75ee9d686c52f7b7624bfceeacc5ca28a95c1b",
"sha256": "sha256-YcrFZD9QeVIPTfBkQPC/SKkxRVwMRW8wnHVItEGKElI="
}
}
},
@@ -9579,20 +9579,20 @@
},
{
"path": "com/fasterxml/jackson/core/jackson-core/2.15.3",
"path": "com/fasterxml/jackson/core/jackson-core/2.16.0-rc1",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"jackson-core-2.15.3.pom": {
"sha1": "6291d6b0843755417d2bc20c2be4904dd467b836",
"sha256": "sha256-zNUAkXSDshrhg135hFuRqxGsmroIt5PS7PgtKMBp7OI="
"jackson-core-2.16.0-rc1.pom": {
"sha1": "be1f4e4e7d6b2c74859aa81edb8bbd00e701172f",
"sha256": "sha256-wOXaP11xEWp/+0BgexwoXwv81kmXDk/qfEkb4N31cLM="
},
"jackson-core-2.15.3.jar": {
"sha1": "60d600567c1862840397bf9ff5a92398edc5797b",
"sha256": "sha256-Ufq3qtUe1YhILtxQf9VCdHk2xQlNGrdu0h3bY7lrYQ0="
"jackson-core-2.16.0-rc1.jar": {
"sha1": "dba6d80eb8bfc326eaa1e72483e6d80852503e29",
"sha256": "sha256-3mlqkMaoGhFeJSu2pDkq85T6je9Da8f66CgL1mwccXI="
},
"jackson-core-2.15.3.module": {
"sha1": "cfe2c6fcdf029eb556be3e56ede868535112a856",
"sha256": "sha256-E4ApvLMrC/pwENP2RmMr3lyYwYfi8aoSChzUE/I6bCg="
"jackson-core-2.16.0-rc1.module": {
"sha1": "e948b398d5cc338a0f300fa633caf797bac121a7",
"sha256": "sha256-qyE84ApdlT2sZVSlaOw1qPOFA4AMLOt21MzD6yiwwMI="
}
}
},
@@ -9613,20 +9613,20 @@
},
{
"path": "com/fasterxml/jackson/core/jackson-databind/2.15.3",
"path": "com/fasterxml/jackson/core/jackson-databind/2.16.0-rc1",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"jackson-databind-2.15.3.pom": {
"sha1": "0542b905f13dc61af5dd15d6cd9bb6cec2375d58",
"sha256": "sha256-tuPNSud9D/lQfqsc55Szqp7ieCQcZUQzO9t++8Wi5Pk="
"jackson-databind-2.16.0-rc1.pom": {
"sha1": "ffb4977a414eddab58b2d3e1fb21ab48657bcb8e",
"sha256": "sha256-1r2DJq1W9dA5yQzF/qcxetqqUB+ybEMEDn6XsNrjgW4="
},
"jackson-databind-2.15.3.jar": {
"sha1": "a734bc2c47a9453c4efa772461a3aeb273c010d9",
"sha256": "sha256-w8UzM6IXKoBni9oYA+Oc/0W+xq4+nH1PRKgexOKrGNw="
"jackson-databind-2.16.0-rc1.jar": {
"sha1": "cb84bf813891fd3a6c04518f7dce66cb7f914c12",
"sha256": "sha256-40+i+ah5zRD42Xfib4YK37XTKkxCCJRvTyPHucprgm0="
},
"jackson-databind-2.15.3.module": {
"sha1": "d4d12bf39a3c3560d0a69b6b05adab2182f1da44",
"sha256": "sha256-UbqNcfWgSudo6EyR1O3wmh/IvBJEsDvU+bBguPs5VhU="
"jackson-databind-2.16.0-rc1.module": {
"sha1": "9d6a30d78b30fea5a62cc629addef1dd2f8ffa21",
"sha256": "sha256-wyMhPyOKnSQHiUQZW721rnteq9WNAfZ46HClETqgDiE="
}
}
},
@@ -9658,12 +9658,12 @@
},
{
"path": "com/fasterxml/jackson/jackson-base/2.15.3",
"path": "com/fasterxml/jackson/jackson-base/2.16.0-rc1",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"jackson-base-2.15.3.pom": {
"sha1": "0da5901e059a4accee9e1dbbe41f395a586fcad7",
"sha256": "sha256-QpA0Kr8LDkVnMi/7LQw24lsKh6IXu1azVoCo3Y+NZuQ="
"jackson-base-2.16.0-rc1.pom": {
"sha1": "b0ea2e74cd9077f6394d6c745d84aab9d35436df",
"sha256": "sha256-Xihgwy19do1PsQLQZz7D+aZ1NJBalQNh1yqKdkvPQXM="
}
}
},
@@ -9680,12 +9680,12 @@
},
{
"path": "com/fasterxml/jackson/jackson-bom/2.15.3",
"path": "com/fasterxml/jackson/jackson-bom/2.16.0-rc1",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"jackson-bom-2.15.3.pom": {
"sha1": "1b221d661c2943cccc45acfffd41c07d10963494",
"sha256": "sha256-ZvyZRcFnFrwgL0udfm2WnfP1Cf7/vhrPGjFRG3U9XJ0="
"jackson-bom-2.16.0-rc1.pom": {
"sha1": "9f0aa2b767de8428e4151cc86793a6892cf0b22a",
"sha256": "sha256-oNo29tts8XhCSM+qZ/HXxjNZYTdoEU4Q5MtImXBefZw="
}
}
},
@@ -9702,12 +9702,12 @@
},
{
"path": "com/fasterxml/jackson/jackson-parent/2.15",
"path": "com/fasterxml/jackson/jackson-parent/2.16-rc1",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"jackson-parent-2.15.pom": {
"sha1": "caffbeb9be9350780ad5407789f43664906042ec",
"sha256": "sha256-bN+XvGbzifY+NoUNL1UtEhZoj45aWHJ9P2qY7fhnXN4="
"jackson-parent-2.16-rc1.pom": {
"sha1": "b0b57e481f46e394aa45a2b164af9ad92dd4946b",
"sha256": "sha256-y0Fkj+L5t6Sa19QTaK50D+iHvEs/NQJO2iUayQQ20ss="
}
}
},
@@ -9724,12 +9724,12 @@
},
{
"path": "com/fasterxml/jackson/module/jackson-modules-base/2.15.3",
"path": "com/fasterxml/jackson/module/jackson-modules-base/2.16.0-rc1",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"jackson-modules-base-2.15.3.pom": {
"sha1": "696c8c2635ca5e18809afc24b2c92cff0e930880",
"sha256": "sha256-lhtdELjxVWdSYRkED+Jo9lXQwDF01awJpgJO3IMPWe4="
"jackson-modules-base-2.16.0-rc1.pom": {
"sha1": "449a9b459071042c2d5e3eef698b7435ec7a22d0",
"sha256": "sha256-p7KoYdmdDHItUNIOnfQbO5XcXCMXXMpnK+zHqKPwIow="
}
}
},
@@ -9750,20 +9750,20 @@
},
{
"path": "com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.15.3",
"path": "com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.16.0-rc1",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"jackson-module-jaxb-annotations-2.15.3.pom": {
"sha1": "2d4fdcbe0f7dda2e7396f3757be75117112ba532",
"sha256": "sha256-CUbzJZy+BHolxbVxl3AThdbnteWh+KVrml9dnLT/VYE="
"jackson-module-jaxb-annotations-2.16.0-rc1.pom": {
"sha1": "7cfdd570dea65bb1144cd3280ced0a3359c3a3b3",
"sha256": "sha256-uKkIWZvE6M4xvGiR9cMyPkp6HEucG1kpueJWw0cQjv4="
},
"jackson-module-jaxb-annotations-2.15.3.jar": {
"sha1": "74e8ef60b65b42051258465f06c06195e61e92f2",
"sha256": "sha256-UqDcjpIm04QXmg6chORajQDNup6akvkT6z9PmdqDYno="
"jackson-module-jaxb-annotations-2.16.0-rc1.jar": {
"sha1": "04c27538836a829dcd0f38baf55b4b65eb34283b",
"sha256": "sha256-bXNKNWyTupzAINnzsvgdaP2SUldbIepfLVWWlBbNAsg="
},
"jackson-module-jaxb-annotations-2.15.3.module": {
"sha1": "23d97c5e6a045d87c06e10ae16e0fb57e8367846",
"sha256": "sha256-sbbt714pCVO5k/JYnOUSC+XLBPObuUwZZ376q5ZQ9FI="
"jackson-module-jaxb-annotations-2.16.0-rc1.module": {
"sha1": "65e9ab1a8205e6f8eb8d4652b52c321b2d8b2555",
"sha256": "sha256-7CPt/ZsEE4S6IcZYxd7iiM5js21tdflUkb+lEPMyDPg="
}
}
},
@@ -9795,12 +9795,12 @@
},
{
"path": "com/fasterxml/oss-parent/50",
"path": "com/fasterxml/oss-parent/55",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"oss-parent-50.pom": {
"sha1": "2e5ec5928fa4a136254d3dfeb8c56f47b049d8ed",
"sha256": "sha256-9dpV3XuI+xcMRoAdF3dKZS+y9FgftbHQpfyGqhgrhXc="
"oss-parent-55.pom": {
"sha1": "24ad110e0e507856ae662736d6c6ef5b101a1689",
"sha256": "sha256-D14Y8rNev22Dn3/VSZcog/aWwhD5rjIwr9LCC6iGwE0="
}
}
},
@@ -12027,12 +12027,12 @@
},
{
"path": "com/sun/xml/bind/jaxb-bom-ext/4.0.3",
"path": "com/sun/xml/bind/jaxb-bom-ext/4.0.4",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"jaxb-bom-ext-4.0.3.pom": {
"sha1": "5838d8e4fa9335d67d5b9c092a4a80c1e67b2dad",
"sha256": "sha256-SkQftgU/yfRooSve6hy48Efq9kNzA34/BJrUMEJ/0PA="
"jaxb-bom-ext-4.0.4.pom": {
"sha1": "43e647d464b91a7a232e6c49510598d1476cdfe1",
"sha256": "sha256-AMvdv+7k5Y3pmhnrbrBCS5K8YBttoP+JXcAYPpbsdLM="
}
}
},
@@ -12071,12 +12071,12 @@
},
{
"path": "com/sun/xml/bind/mvn/jaxb-parent/4.0.3",
"path": "com/sun/xml/bind/mvn/jaxb-parent/4.0.4",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"jaxb-parent-4.0.3.pom": {
"sha1": "ce4f3532ee7c0e092605b7b43cc3640999927af7",
"sha256": "sha256-6WIwlX8fVlh/nP25dKNr7XcH6JYWtakKknss99NHZ28="
"jaxb-parent-4.0.4.pom": {
"sha1": "2846b11dfea85e485a63ce6cbc1c30bf4fdd812e",
"sha256": "sha256-5+klMqRcmhpIc2y2goem8e97ey/u1ljUmf3M18ofqts="
}
}
},
@@ -12148,12 +12148,12 @@
},
{
"path": "com/sun/xml/bind/mvn/jaxb-txw-parent/4.0.3",
"path": "com/sun/xml/bind/mvn/jaxb-txw-parent/4.0.4",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"jaxb-txw-parent-4.0.3.pom": {
"sha1": "be33bd0d60d44f50811c22405c29e56f82d7ecd0",
"sha256": "sha256-hU4ErXwT/9tlUbKQ6apsCN10JQdTvMgB4HZVB9EYfXw="
"jaxb-txw-parent-4.0.4.pom": {
"sha1": "e2f336db2b61a4474b0363c6a86a8bca4342deb8",
"sha256": "sha256-4ROP8PpMBot6RjWoE5ZkKuDgdRqSGj/aE8QenwL7I6w="
}
}
},
@@ -12204,16 +12204,16 @@
},
{
"path": "com/sun/xml/fastinfoset/FastInfoset/2.1.0",
"path": "com/sun/xml/fastinfoset/FastInfoset/2.1.1",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"FastInfoset-2.1.0.pom": {
"sha1": "8a3328cc394e06c71de7147d4b8954f5fb3c4326",
"sha256": "sha256-kLnl6oTboVRq9G+7YyYZ8llaMvwGCQ0uwJXao7MtqZc="
"FastInfoset-2.1.1.pom": {
"sha1": "85420a8093b72919bd47f0e4ca8abf2274c3797c",
"sha256": "sha256-Sf3LDhtzh1Ln2kuljnpenkhskI8ZuFNTVQadrvq3On4="
},
"FastInfoset-2.1.0.jar": {
"sha1": "cd92e93ef4ee608bffe4ba41b1247846a3d42227",
"sha256": "sha256-uWgWGqtr6x6hpKYqPYS112LWJoH3ziPPAwSZFdl0jSE="
"FastInfoset-2.1.1.jar": {
"sha1": "650c84348bbcf4461bd24d38e67f7a7ce687de24",
"sha256": "sha256-ddZjXgkQHvFUXZpZu02VJOxr8VJGVAr1Q1dQ8nFhJ2U="
}
}
},
@@ -12252,12 +12252,12 @@
},
{
"path": "com/sun/xml/fastinfoset/fastinfoset-project/2.1.0",
"path": "com/sun/xml/fastinfoset/fastinfoset-project/2.1.1",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"fastinfoset-project-2.1.0.pom": {
"sha1": "170bbdc773e5317f258728a71a4629e6ee17a0d1",
"sha256": "sha256-zCQMIUxrJpsvx459lRp1YRd5X0PRUts686i+shjve+o="
"fastinfoset-project-2.1.1.pom": {
"sha1": "64c42818f61c961fd357788a0e8287369358258d",
"sha256": "sha256-HoDvsaCRWw+GJrp11ylrXxuwJpoKL51zh62Zh/duTAk="
}
}
},
@@ -15599,12 +15599,12 @@
},
{
"path": "org/glassfish/jaxb/jaxb-bom/4.0.3",
"path": "org/glassfish/jaxb/jaxb-bom/4.0.4",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"jaxb-bom-4.0.3.pom": {
"sha1": "53d62c7214b0bece9a644e50df2a7d2aa37e0db8",
"sha256": "sha256-Zg8EhAYlliYXiumpcrA86VFmXDPDM8q0U7EXi40NJBU="
"jaxb-bom-4.0.4.pom": {
"sha1": "d1830dd5724a8e016bc02f09b67da8d92def48af",
"sha256": "sha256-FuRpMAtWNmdun7N52twbuY9B98O4ajCuSTjp5NSBLfw="
}
}
},
@@ -15625,16 +15625,16 @@
},
{
"path": "org/glassfish/jaxb/jaxb-core/4.0.3",
"path": "org/glassfish/jaxb/jaxb-core/4.0.4",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"jaxb-core-4.0.3.pom": {
"sha1": "0ed53eb2323c424a024c5b87c7a217f282d43dda",
"sha256": "sha256-crhKVGcO3sRAUgH3Heo7C/aYJbrkFjNtfzFAbGnHoyc="
"jaxb-core-4.0.4.pom": {
"sha1": "bebde7111ac1bc5789b3bdd1cbbe779ca536a727",
"sha256": "sha256-TpWVc9NJxkOGq2ayYB7etV008XURTVvIKdi2gXU1+pQ="
},
"jaxb-core-4.0.3.jar": {
"sha1": "e9093b4a82069a1d78ee9a3233ca387bca88861f",
"sha256": "sha256-1tdcQidSaE+/BN10ohaY/q4OSkBsKJK1rwLSPcl7KsY="
"jaxb-core-4.0.4.jar": {
"sha1": "2d5aadd02af86f1e9d8c6f7e8501673f915d4e25",
"sha256": "sha256-ARKiZiNGD7TfWgoptmPyrf5+lYTrE4rgR7WiHJRX8Nc="
}
}
},
@@ -15730,16 +15730,16 @@
},
{
"path": "org/glassfish/jaxb/txw2/4.0.3",
"path": "org/glassfish/jaxb/txw2/4.0.4",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"txw2-4.0.3.pom": {
"sha1": "998f7a3836d5e44d6fdce01e3c67d8fe01ca6f43",
"sha256": "sha256-i4TetIZ5zAQrPL7GjXA9+c6May+SOdqKKOPKqp7a1Nk="
"txw2-4.0.4.pom": {
"sha1": "8202a6876a73122a6349569a327508713d849fcf",
"sha256": "sha256-rPArplfsukbSZyFAfOj3Vl1NBPpFwTt0QXoVT7Qm9SA="
},
"txw2-4.0.3.jar": {
"sha1": "47b8fe31c6d1a3382203af919400527389e01e9c",
"sha256": "sha256-3welGAG5leRK7JqV74ddlfu43ih0QX3mBm2E9zHLnpw="
"txw2-4.0.4.jar": {
"sha1": "cfd2bcf08782673ac370694fdf2cf76dbaa607ef",
"sha256": "sha256-Mue9UXjinyKU0D0nk8QeVOUjWLarlc0TQ/JsHCsnQic="
}
}
},
@@ -18162,6 +18162,21 @@
}
},
{
"path": "org/junit/junit-bom/5.9.3",
"repo": "https://repo.maven.apache.org/maven2",
"files": {
"junit-bom-5.9.3.pom": {
"sha1": "b1874b6a66656e4f5e4b492ab321249bcb749dc7",
"sha256": "sha256-TQMpzZ5y8kIOXKFXJMv+b/puX9KIg2FRYnEZD9w0Ltc="
},
"junit-bom-5.9.3.module": {
"sha1": "d70d3d9a503c573e648ef70fb2e211fbe44aa63e",
"sha256": "sha256-tAH9JZAeWCpSSqU0PEs54ovFbiSWHBBpvytLv87ka5M="
}
}
},
{
"path": "org/junit/junit-bom/5.10.0",
"repo": "https://repo.maven.apache.org/maven2",
+2 -2
View File
@@ -117,7 +117,7 @@ commons-codec:commons-codec:1.11
commons-io:commons-io:2.4
commons-logging:commons-logging:1.1.1
commons-logging:commons-logging:1.2
com.adobe.xmp:xmpcore:6.0.6
com.adobe.xmp:xmpcore:6.1.11
com.afollestad.material-dialogs:commons:0.9.6.0
com.afollestad.material-dialogs:core:0.9.6.0
com.airbnb.android:lottie:3.4.4
@@ -444,7 +444,7 @@ com.diffplug.durian:durian-io:1.2.0
com.diffplug.spotless:spotless-lib-extra:2.30.0
com.diffplug.spotless:spotless-lib:2.30.0
com.diffplug.spotless:spotless-plugin-gradle:6.11.0
com.drewnoakes:metadata-extractor:2.12.0
com.drewnoakes:metadata-extractor:2.18.0
com.facebook.conceal:conceal:1.1.3
com.facebook.fbjni:fbjni-java-only:0.2.2
com.facebook.fresco:animated-base:2.5.0
+20 -19
View File
@@ -498,7 +498,7 @@ https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.16.0/commons-
https://repo.maven.apache.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.pom
https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom
https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.2/commons-logging-1.2.pom
https://repo.maven.apache.org/maven2/com/adobe/xmp/xmpcore/6.0.6/xmpcore-6.0.6.pom
https://repo.maven.apache.org/maven2/com/adobe/xmp/xmpcore/6.1.11/xmpcore-6.1.11.pom
https://repo.maven.apache.org/maven2/com/afollestad/material-dialogs/commons/0.9.6.0/commons-0.9.6.0.pom
https://repo.maven.apache.org/maven2/com/afollestad/material-dialogs/core/0.9.6.0/core-0.9.6.0.pom
https://repo.maven.apache.org/maven2/com/airbnb/android/lottie/3.4.4/lottie-3.4.4.pom
@@ -563,7 +563,7 @@ https://repo.maven.apache.org/maven2/com/diffplug/durian/durian-io/1.2.0/durian-
https://repo.maven.apache.org/maven2/com/diffplug/spotless/spotless-lib-extra/2.30.0/spotless-lib-extra-2.30.0.pom
https://repo.maven.apache.org/maven2/com/diffplug/spotless/spotless-lib/2.30.0/spotless-lib-2.30.0.pom
https://repo.maven.apache.org/maven2/com/diffplug/spotless/spotless-plugin-gradle/6.11.0/spotless-plugin-gradle-6.11.0.pom
https://repo.maven.apache.org/maven2/com/drewnoakes/metadata-extractor/2.12.0/metadata-extractor-2.12.0.pom
https://repo.maven.apache.org/maven2/com/drewnoakes/metadata-extractor/2.18.0/metadata-extractor-2.18.0.pom
https://repo.maven.apache.org/maven2/com/facebook/conceal/conceal/1.1.3/conceal-1.1.3.pom
https://repo.maven.apache.org/maven2/com/facebook/fbjni/fbjni-java-only/0.2.2/fbjni-java-only-0.2.2.pom
https://repo.maven.apache.org/maven2/com/facebook/fresco/animated-base/2.5.0/animated-base-2.5.0.pom
@@ -593,25 +593,25 @@ https://repo.maven.apache.org/maven2/com/facebook/soloader/soloader/0.10.1/soloa
https://repo.maven.apache.org/maven2/com/facebook/soloader/soloader/0.10.3/soloader-0.10.3.pom
https://repo.maven.apache.org/maven2/com/facebook/yoga/proguard-annotations/1.19.0/proguard-annotations-1.19.0.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.11.1/jackson-annotations-2.11.1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.15.3/jackson-annotations-2.15.3.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.16.0-rc1/jackson-annotations-2.16.0-rc1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.11.1/jackson-core-2.11.1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.15.3/jackson-core-2.15.3.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.16.0-rc1/jackson-core-2.16.0-rc1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.11.1/jackson-databind-2.11.1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.15.3/jackson-databind-2.15.3.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.16.0-rc1/jackson-databind-2.16.0-rc1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-xml/2.11.1/jackson-dataformat-xml-2.11.1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-base/2.11.1/jackson-base-2.11.1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-base/2.15.3/jackson-base-2.15.3.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-base/2.16.0-rc1/jackson-base-2.16.0-rc1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-bom/2.11.1/jackson-bom-2.11.1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-bom/2.15.3/jackson-bom-2.15.3.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-bom/2.16.0-rc1/jackson-bom-2.16.0-rc1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-parent/2.11/jackson-parent-2.11.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-parent/2.15/jackson-parent-2.15.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-parent/2.16-rc1/jackson-parent-2.16-rc1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-modules-base/2.11.1/jackson-modules-base-2.11.1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-modules-base/2.15.3/jackson-modules-base-2.15.3.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-modules-base/2.16.0-rc1/jackson-modules-base-2.16.0-rc1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.11.1/jackson-module-jaxb-annotations-2.11.1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.15.3/jackson-module-jaxb-annotations-2.15.3.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.16.0-rc1/jackson-module-jaxb-annotations-2.16.0-rc1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-kotlin/2.11.1/jackson-module-kotlin-2.11.1.pom
https://repo.maven.apache.org/maven2/com/fasterxml/oss-parent/38/oss-parent-38.pom
https://repo.maven.apache.org/maven2/com/fasterxml/oss-parent/50/oss-parent-50.pom
https://repo.maven.apache.org/maven2/com/fasterxml/oss-parent/55/oss-parent-55.pom
https://repo.maven.apache.org/maven2/com/fasterxml/woodstox/woodstox-core/6.2.1/woodstox-core-6.2.1.pom
https://repo.maven.apache.org/maven2/com/github/bumptech/glide/annotations/4.12.0/annotations-4.12.0.pom
https://repo.maven.apache.org/maven2/com/github/bumptech/glide/compiler/4.12.0/compiler-4.12.0.pom
@@ -771,26 +771,26 @@ https://repo.maven.apache.org/maven2/com/sun/istack/istack-commons/4.2.0/istack-
https://repo.maven.apache.org/maven2/com/sun/xml/bind/jaxb-bom-ext/2.2.11/jaxb-bom-ext-2.2.11.pom
https://repo.maven.apache.org/maven2/com/sun/xml/bind/jaxb-bom-ext/2.3.1/jaxb-bom-ext-2.3.1.pom
https://repo.maven.apache.org/maven2/com/sun/xml/bind/jaxb-bom-ext/2.3.2/jaxb-bom-ext-2.3.2.pom
https://repo.maven.apache.org/maven2/com/sun/xml/bind/jaxb-bom-ext/4.0.3/jaxb-bom-ext-4.0.3.pom
https://repo.maven.apache.org/maven2/com/sun/xml/bind/jaxb-bom-ext/4.0.4/jaxb-bom-ext-4.0.4.pom
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-parent/2.2.11/jaxb-parent-2.2.11.pom
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-parent/2.3.1/jaxb-parent-2.3.1.pom
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-parent/2.3.2/jaxb-parent-2.3.2.pom
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-parent/4.0.3/jaxb-parent-4.0.3.pom
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-parent/4.0.4/jaxb-parent-4.0.4.pom
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-runtime-parent/2.2.11/jaxb-runtime-parent-2.2.11.pom
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-runtime-parent/2.3.1/jaxb-runtime-parent-2.3.1.pom
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-runtime-parent/2.3.2/jaxb-runtime-parent-2.3.2.pom
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-txw-parent/2.2.11/jaxb-txw-parent-2.2.11.pom
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-txw-parent/2.3.1/jaxb-txw-parent-2.3.1.pom
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-txw-parent/2.3.2/jaxb-txw-parent-2.3.2.pom
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-txw-parent/4.0.3/jaxb-txw-parent-4.0.3.pom
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-txw-parent/4.0.4/jaxb-txw-parent-4.0.4.pom
https://repo.maven.apache.org/maven2/com/sun/xml/fastinfoset/FastInfoset/1.2.13/FastInfoset-1.2.13.pom
https://repo.maven.apache.org/maven2/com/sun/xml/fastinfoset/FastInfoset/1.2.15/FastInfoset-1.2.15.pom
https://repo.maven.apache.org/maven2/com/sun/xml/fastinfoset/FastInfoset/1.2.16/FastInfoset-1.2.16.pom
https://repo.maven.apache.org/maven2/com/sun/xml/fastinfoset/FastInfoset/2.1.0/FastInfoset-2.1.0.pom
https://repo.maven.apache.org/maven2/com/sun/xml/fastinfoset/FastInfoset/2.1.1/FastInfoset-2.1.1.pom
https://repo.maven.apache.org/maven2/com/sun/xml/fastinfoset/fastinfoset-project/1.2.13/fastinfoset-project-1.2.13.pom
https://repo.maven.apache.org/maven2/com/sun/xml/fastinfoset/fastinfoset-project/1.2.15/fastinfoset-project-1.2.15.pom
https://repo.maven.apache.org/maven2/com/sun/xml/fastinfoset/fastinfoset-project/1.2.16/fastinfoset-project-1.2.16.pom
https://repo.maven.apache.org/maven2/com/sun/xml/fastinfoset/fastinfoset-project/2.1.0/fastinfoset-project-2.1.0.pom
https://repo.maven.apache.org/maven2/com/sun/xml/fastinfoset/fastinfoset-project/2.1.1/fastinfoset-project-2.1.1.pom
https://repo.maven.apache.org/maven2/com/tunnelvisionlabs/antlr4-annotations/4.5/antlr4-annotations-4.5.pom
https://repo.maven.apache.org/maven2/com/tunnelvisionlabs/antlr4-annotations/4.9.0/antlr4-annotations-4.9.0.pom
https://repo.maven.apache.org/maven2/com/tunnelvisionlabs/antlr4-master/4.5/antlr4-master-4.5.pom
@@ -1031,16 +1031,16 @@ https://repo.maven.apache.org/maven2/org/eclipse/jgit/org.eclipse.jgit/5.13.1.20
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-bom/2.2.11/jaxb-bom-2.2.11.pom
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-bom/2.3.1/jaxb-bom-2.3.1.pom
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-bom/2.3.2/jaxb-bom-2.3.2.pom
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-bom/4.0.3/jaxb-bom-4.0.3.pom
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-bom/4.0.4/jaxb-bom-4.0.4.pom
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-core/2.2.11/jaxb-core-2.2.11.pom
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-core/4.0.3/jaxb-core-4.0.3.pom
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-core/4.0.4/jaxb-core-4.0.4.pom
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-runtime/2.2.11/jaxb-runtime-2.2.11.pom
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-runtime/2.3.1/jaxb-runtime-2.3.1.pom
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-runtime/2.3.2/jaxb-runtime-2.3.2.pom
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/txw2/2.2.11/txw2-2.2.11.pom
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/txw2/2.3.1/txw2-2.3.1.pom
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/txw2/2.3.2/txw2-2.3.2.pom
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/txw2/4.0.3/txw2-4.0.3.pom
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/txw2/4.0.4/txw2-4.0.4.pom
https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom
https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/2.2/hamcrest-core-2.2.pom
https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-parent/1.3/hamcrest-parent-1.3.pom
@@ -1199,6 +1199,7 @@ https://repo.maven.apache.org/maven2/org/json/json/20180813/json-20180813.pom
https://repo.maven.apache.org/maven2/org/json/json/20231013/json-20231013.pom
https://repo.maven.apache.org/maven2/org/jsoup/jsoup/1.13.1/jsoup-1.13.1.pom
https://repo.maven.apache.org/maven2/org/junit/junit-bom/5.9.2/junit-bom-5.9.2.pom
https://repo.maven.apache.org/maven2/org/junit/junit-bom/5.9.3/junit-bom-5.9.3.pom
https://repo.maven.apache.org/maven2/org/junit/junit-bom/5.10.0/junit-bom-5.10.0.pom
https://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/1.7.7/stax-ex-1.7.7.pom
https://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/1.8.1/stax-ex-1.8.1.pom
+2 -2
View File
@@ -10,9 +10,9 @@
"dependencies": {
"@babel/preset-typescript": "^7.17.12",
"@react-native-async-storage/async-storage": "^1.17.9",
"@react-native-camera-roll/camera-roll": "git+https://github.com/status-im/react-native-camera-roll.git#refs/tags/v5.1.1.1",
"@react-native-community/audio-toolkit": "git+https://github.com/tbenr/react-native-audio-toolkit.git#refs/tags/v2.0.3-status-v6",
"@react-native-community/blur": "git+https://github.com/status-im/react-native-blur#refs/tags/v4.3.3-status",
"@react-native-community/cameraroll": "git+https://github.com/status-im/react-native-cameraroll.git#refs/tags/v4.0.4-status.0",
"@react-native-community/clipboard": "^1.2.2",
"@react-native-community/hooks": "^3.0.0",
"@react-native-community/masked-view": "^0.1.6",
@@ -34,7 +34,7 @@
"react-native": "0.69.10",
"react-native-background-timer": "^2.1.1",
"react-native-blob-util": "^0.13.18",
"react-native-camera-kit": "^13.0.0",
"react-native-camera-kit": "14.0.0-beta13",
"react-native-config": "^1.5.0",
"react-native-dialogs": "^1.0.4",
"react-native-draggable-flatlist": "^4.0.1",
BIN
View File
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 615 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 930 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 615 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 930 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
if pgrep -f 'shadow-cljs watch mobile' > /dev/null; then
echo "Error: make run-clojure is already running in another terminal" >&2
echo "Please close that terminal before running this command." >&2
exit 1
fi
if pgrep -f 'react-native start' > /dev/null; then
echo "Error: make run-metro is already running in another terminal" >&2
echo "Please close that terminal before running this command." >&2
exit 1
fi
exit 0
+2 -4
View File
@@ -106,11 +106,9 @@
:target :node-test
;; Uncomment line below to `make test-watch` a specific file
;; :ns-regexp "status-im2.subs.messages-test$"
:main
status-im.test-runner/main
:main status-im.test-runner/main
;; set :ui-driven to true to let shadow-cljs inject node-repl
:ui-driven
true
:ui-driven true
:closure-defines
{status-im2.config/POKT_TOKEN #shadow/env "POKT_TOKEN"
status-im2.config/INFURA_TOKEN #shadow/env "INFURA_TOKEN"
-7
View File
@@ -6,10 +6,3 @@ export function infoLayout(input, isTop) {
return isTop ? input.value : -input.value;
});
}
export function textSheet(input, isHeight) {
return useDerivedValue(function () {
'worklet';
return isHeight ? input.value : -input.value;
});
}
+3 -2
View File
@@ -346,7 +346,8 @@
(clj->js {:BlurView {}}))
(def react-native-camera-roll
(clj->js {:default #js {}}))
(clj->js {:default #js {}
:CameraRoll #js {}}))
(def react-native-orientation-locker
(clj->js {:default #js {}
@@ -410,7 +411,7 @@
"react-native-navigation" react-native-navigation
"@react-native-community/push-notification-ios" push-notification-ios
"@react-native-community/blur" react-native-blur
"@react-native-community/cameraroll" react-native-camera-roll
"@react-native-camera-roll/camera-roll" react-native-camera-roll
"react-native-camera-kit" react-native-camera-kit
"react-native-permissions" react-native-permissions
"rn-emoji-keyboard" rn-emoji-keyboard
+1 -1
View File
@@ -37,6 +37,6 @@
:color icon-color}]]
[rn/image
{:source icon
:style {:width 32 :height 32}}])))
:style {:width component-size :height component-size}}])))
(def icon-avatar (quo.theme/with-theme icon-avatar-internal))
@@ -0,0 +1,3 @@
(ns quo.components.colors.color.constants)
(def ^:const IPHONE_11_PRO_VIEWPORT_WIDTH 375)
+28 -16
View File
@@ -1,24 +1,36 @@
(ns quo.components.colors.color.style
(:require
[quo.foundations.colors :as colors]))
[quo.foundations.colors :as colors]
[utils.responsiveness :as responsiveness]))
(def color-button-common
{:width 48
:height 48
:border-width 4
:border-radius 24
:margin-horizontal 4
:transform [{:rotate "45deg"}]
:border-color :transparent})
(defn color-button-common
[window-width]
{:width 48
:height 48
:border-width 4
:border-radius 24
:margin-right (-> window-width
(- responsiveness/IPHONE_11_PRO_VIEWPORT_WIDTH) ;We want the design to be 100%
;identical to Figma on iPhone 11
;Pro, So we're using it's VW here.
(/ 6) ;Dividing by an appropriate factor to get a reasonable value for each VW
;on other devices (This will yield 0 on iPhone 11 Pro, Which is what we
;want)
(+ 8)) ;Add same margin that's on Figma for 11 Pro, This value will increase
;based on the device VW because of the division above.
:transform [{:rotate "45deg"}]
:border-color :transparent})
(defn color-button
[color selected?]
(merge color-button-common
(when selected?
{:border-top-color (colors/alpha color 0.4)
:border-end-color (colors/alpha color 0.4)
:border-bottom-color (colors/alpha color 0.2)
:border-start-color (colors/alpha color 0.2)})))
([color selected?]
(color-button color selected? nil nil))
([color selected? idx window-width]
(cond-> (color-button-common window-width)
selected? (assoc :border-top-color (colors/alpha color 0.4)
:border-end-color (colors/alpha color 0.4)
:border-bottom-color (colors/alpha color 0.2)
:border-start-color (colors/alpha color 0.2))
(zero? idx) (assoc :margin-left -4))))
(defn color-circle
[color border?]
+4 -2
View File
@@ -19,7 +19,9 @@
selected?
on-press
blur?
theme]
theme
idx
window-width]
:as props}]
(let [border? (and (not blur?) (not selected?))
hex-color (if (= :feng-shui color)
@@ -29,7 +31,7 @@
theme))]
[rn/pressable
{:style (style/color-button hex-color selected?)
{:style (style/color-button hex-color selected? idx window-width)
:accessibility-label :color-picker-item
:on-press #(on-press color)}
(if (and (= :feng-shui color) (not selected?))
@@ -18,19 +18,22 @@
- `on-change` Callback called when a color is selected `(fn [color-name])`.
- `blur?` Boolean to enable blur background support.}"
[{:keys [default-selected]}]
(let [selected (reagent/atom default-selected)]
(let [selected (reagent/atom default-selected)
{window-width :width} (rn/get-window)]
(fn [{:keys [blur? on-change feng-shui? container-style]}]
[rn/scroll-view
{:horizontal true
:shows-horizontal-scroll-indicator false
:content-container-style container-style}
(doall (map (fn [color]
[color/view
{:selected? (= color @selected)
:on-press #(on-change-handler selected % on-change)
:blur? blur?
:key color
:color color}])
;; TODO: using :feng-shui? temporarily while b & w is being developed.
;; https://github.com/status-im/status-mobile/discussions/16676
(if feng-shui? (conj color-list :feng-shui) color-list)))])))
(doall (map-indexed (fn [idx color]
[color/view
{:selected? (= color @selected)
:on-press #(on-change-handler selected % on-change)
:blur? blur?
:key color
:color color
:idx idx
:window-width window-width}])
;; TODO: using :feng-shui? temporarily while b & w is being developed.
;; https://github.com/status-im/status-mobile/discussions/16676
(if feng-shui? (conj color-list :feng-shui) color-list)))])))
+10 -10
View File
@@ -3,7 +3,7 @@
[clojure.string :as string]
[quo.components.community.style :as style]
[quo.components.markdown.text :as text]
[quo.components.tags.token-tag :as token-tag]
[quo.components.tags.token-tag.view :as token-tag]
[quo.theme :as quo.theme]
[react-native.core :as rn]
[utils.i18n :as i18n]))
@@ -14,17 +14,17 @@
{:style (style/token-row padding?)}
(doall
(map-indexed (fn [token-index token]
(let [{:keys [img-src amount sufficient? purchasable? loading?]} token]
(let [{:keys [img-src amount sufficient? purchasable?]} token]
^{:key token-index}
[rn/view {:style style/token-tag-spacing}
[token-tag/token-tag
{:symbol (:symbol token)
:value amount
:size 24
:sufficient? sufficient?
:purchasable purchasable?
:loading? loading?
:img-src img-src}]]))
[token-tag/view
{:token-symbol (:symbol token)
:token-value amount
:size :size-24
:options (cond
sufficient? :hold
purchasable? :add)
:token-img-src img-src}]]))
tokens))])
(defn- internal-view
@@ -18,6 +18,19 @@
(h/render [bottom-actions/view
{:actions :2-actions
:button-one-label button-one
:button-one-props {:icon-left :i/arrow-left}
:button-two-label button-two}])
(h/is-truthy (h/get-by-text button-one))
(h/is-truthy (h/get-by-text button-two)))))
(h/is-truthy (h/get-by-label-text :icon))
(h/is-truthy (h/get-by-text button-two))))
(h/test "render disabled button"
(h/render [bottom-actions/view
{:description "Sample description"
:button-one-props {:disabled? true}
:button-one-label "button"}])
(h/is-disabled (h/get-by-label-text :button-one)))
(h/test "sane defaults"
(h/render [bottom-actions/view {}])
(h/is-truthy (h/get-by-label-text :button-one))))
@@ -17,32 +17,35 @@
:description - string (default nil) - Description to display below the title
:button-one-label - string (default nil) - Label for the first button
:button-two-label - string (default nil) - Label for the second button
:button-one-press - fn (default nil) - Function to call when the first button is pressed
:button-two-press - fn (default nil) - Function to call when the second button is pressed
:button-one-props - map with props for button one
:button-two-props - map with props for button two
:theme - :light/:dark
:scroll - bool (default false) - Whether the iOS Home Indicator should be rendered
:button-one-type - same as button/button :type
:button-two-type - same as button/button :type"
:scroll? - bool (default false) - Whether the iOS Home Indicator should be rendered"
[props]
(let [{:keys [actions description button-one-label button-two-label
button-one-press button-two-press theme
scroll? button-one-type button-two-type]}
button-one-props button-two-props theme scroll?]}
(merge default-props props)]
[:<>
[rn/view {:style style/buttons-container}
(when (= actions :2-actions)
[button/button
{:size 40
:background (when scroll? :blur)
:container-style style/button-container-2-actions
:type button-two-type
:on-press button-two-press} button-two-label])
(merge
{:size 40
:background (when scroll? :blur)
:container-style style/button-container-2-actions
:theme theme
:accessibility-label :button-two}
button-two-props)
button-two-label])
[button/button
{:size 40
:container-style style/button-container
:type button-one-type
:background (when scroll? :blur)
:on-press button-one-press} button-one-label]]
(merge
{:size 40
:container-style style/button-container
:background (when scroll? :blur)
:theme theme
:accessibility-label :button-one}
button-one-props)
button-one-label]]
(when description
[text/text
{:size :paragraph-2
@@ -57,7 +57,7 @@
{:title "Title"
:type :account
:account-avatar-emoji "🍿"
:networks [{:name :ethereum :short :eth}]
:networks [{:name :ethereum :short-name "eth"}]
:description "0x62b...0a5"
:customization-color :purple}])
(h/is-truthy (h/get-by-text "Title"))
+11 -17
View File
@@ -8,6 +8,7 @@
[quo.components.icon :as icons]
[quo.components.markdown.text :as text]
[quo.components.tags.context-tag.view :as context-tag]
[quo.components.wallet.address-text.view :as address-text]
[quo.foundations.colors :as colors]
[quo.theme :as quo.theme]
[react-native.core :as rn]
@@ -32,14 +33,6 @@
:profile-picture profile-picture}]
nil))
(defn- network-view
[network]
[text/text
{:size :paragraph-2
:weight :regular
:style (style/network-text-color (:name network))}
(str (name (:short network)) ":")])
(defn- keypair-subtitle
[{:keys [theme blur? keycard?]}]
[rn/view {:style style/row}
@@ -59,15 +52,16 @@
(defn- account-subtitle
[{:keys [networks theme blur? description]}]
[rn/view {:style style/row}
(for [network networks]
^{:key (str network)}
[network-view network])
[text/text
{:size :paragraph-2
:weight :regular
:style (style/description theme blur?)}
description]])
(if networks
[address-text/view
{:networks networks
:address description
:format :short}]
[text/text
{:size :paragraph-2
:weight :regular
:style (style/description theme blur?)}
description]))
(defn- default-keypair-subtitle
[{:keys [description theme blur?]}]
@@ -0,0 +1,20 @@
(ns quo.components.dropdowns.dropdown-input.view
(:require
[quo.components.dropdowns.dropdown.properties :as properties]
[quo.components.dropdowns.dropdown.style :as style]
[quo.components.icon :as icon]
[quo.components.markdown.text :as text]
[quo.foundations.customization-colors :as customization-colors]
[quo.theme :as theme]
[react-native.blur :as blur]
[react-native.core :as rn]))
(defn view-internal
[]
[rn/pressable
{:on-press nil}])
(def view
"Props:
- :on-press - function to call when pressed"
(theme/with-theme view-internal))
+1 -1
View File
@@ -150,7 +150,7 @@
:auto-complete :password
:secure-text-entry (not @password-shown?)
:right-icon {:style-fn style/password-icon
:icon-name (if @password-shown? :i/hide :i/reveal)
:icon-name (if @password-shown? :i/hide-password :i/reveal)
:on-press #(swap! password-shown? not)})])))
(defn input-internal
@@ -4,19 +4,12 @@
[quo.components.icon :as icon]
[quo.components.list-items.account.style :as style]
[quo.components.markdown.text :as text]
[quo.components.wallet.address-text.view :as address-text]
[quo.foundations.colors :as colors]
[quo.theme :as quo.theme]
[react-native.core :as rn]
[reagent.core :as reagent]))
(defn- network-view
[network]
[text/text
{:size :paragraph-2
:weight :regular
:style {:color (colors/custom-color (:name network))}}
(str (name (:short network)) ":")])
(defn- account-view
[{:keys [account-props title-icon? blur? theme]
:or {title-icon? false}}]
@@ -38,15 +31,10 @@
:color (if blur?
colors/white-opa-40
(colors/theme-colors colors/neutral-50 colors/neutral-40 theme))}]])]
[text/text {:size :paragraph-2}
(for [network (:networks account-props)]
^{:key (str network)}
[network-view network])
[text/text
{:size :paragraph-2
:weight :monospace
:style (style/account-address blur? theme)}
(:address account-props)]]]])
[address-text/view
{:networks (:networks account-props)
:address (:address account-props)
:format :short}]]])
(defn- balance-view
[{:keys [balance-props type theme]}]
@@ -4,6 +4,7 @@
[quo.components.icon :as icon]
[quo.components.list-items.account-list-card.style :as style]
[quo.components.markdown.text :as text]
[quo.components.wallet.address-text.view :as address-text]
[quo.foundations.colors :as colors]
[quo.theme :as quo.theme]
[react-native.core :as rn]
@@ -26,20 +27,10 @@
{:weight :semi-bold
:size :paragraph-2}
(:name account-props)]
[text/text {:size :paragraph-2}
(map (fn [network]
^{:key (str network)}
[text/text
{:size :paragraph-2
:style {:color (colors/resolve-color network theme)}}
(str (subs (name network) 0 3) ":")])
networks)
[text/text
{:size :paragraph-2
:style {:color (if blur?
colors/white-opa-40
(colors/theme-colors colors/neutral-50 colors/neutral-40 theme))}}
(:address account-props)]]]]
[address-text/view
{:networks networks
:address (:address account-props)
:format :short}]]]
(when (= action :icon)
[rn/pressable {:on-press on-options-press}
[icon/icon :i/options
@@ -64,11 +64,11 @@
(defn- view-internal
"[preview-list opts items]
opts
{:type :user/:communities/:accounts/:tokens/:collectibles/:dapps/:network
:size :size-32 | :size-24 | :size-20 | :size-16 | :size-14
:number number of items in the list (optional)
:blur? overflow-label blur?}
items preview list items (only 4 items is required for preview)
{:type :user/:communities/:accounts/:tokens/:collectibles/:dapps/:network
:size :size-32 | :size-24 | :size-20 | :size-16 | :size-14
:number number of items in the list (optional)
:blur? overflow-label blur?}
items preview list items (only 4 items is required for preview)
"
[{:keys [type size number blur?]} items]
(let [size-key (if (contains? properties/sizes size) size :size-24)
@@ -0,0 +1,47 @@
(ns quo.components.list-items.token-network.component-spec
(:require [quo.components.list-items.token-network.view :as token-network]
[quo.foundations.colors :as colors]
[quo.foundations.resources :as resources]
[test-helpers.component :as h]))
(def props
{:token (resources/get-token :snt)
:state :default
:label "Status"
:networks [(resources/get-network :ethereum)]
:token-value "100.00 SNT"
:fiat-value "€0.00"})
(h/describe "List items: Token network"
(h/test "default state"
(h/render [token-network/view (dissoc props :state)])
(h/is-truthy (h/get-by-text "Status")))
(h/test "default state explicit"
(h/render [token-network/view props])
(h/is-truthy (h/get-by-text "Status")))
(h/test "Pressed state"
(h/render [token-network/view props])
(h/fire-event :on-press-in (h/get-by-label-text :token-network))
(h/wait-for #(h/has-style (h/query-by-label-text :token-network)
{:backgroundColor (colors/resolve-color :blue :light 5)})))
(h/test "Active state"
(h/render [token-network/view (assoc props :state :active)])
(h/has-style (h/query-by-label-text :token-network)
{:backgroundColor (colors/resolve-color :blue :light 10)}))
(h/test "Selected state"
(h/render [token-network/view (assoc props :state :selected)])
(h/is-truthy (h/query-by-label-text :check-icon)))
(h/test "Call on-press"
(let [on-press (h/mock-fn)]
(h/render [token-network/view (assoc props :on-press on-press)])
(h/fire-event :on-press (h/get-by-label-text :token-network))
(h/was-called on-press)))
(h/test "Empty props"
(h/render [token-network/view {}])
(h/is-truthy (h/get-by-label-text :token-network))))
@@ -0,0 +1,47 @@
(ns quo.components.list-items.token-network.style
(:require [quo.foundations.colors :as colors]))
(defn- background-color
[state customization-color theme]
(cond
(= state :pressed) (colors/resolve-color customization-color theme 5)
(= state :active) (colors/resolve-color customization-color theme 10)
(= state :selected) (colors/resolve-color customization-color theme 5)
:else :transparent))
(defn container
[state customization-color theme]
{:flex-direction :row
:justify-content :space-between
:align-items :center
:padding-horizontal 12
:padding-vertical 8
:border-radius 12
:height 56
:background-color (background-color state customization-color theme)})
(defn check-color
[customization-color theme]
(colors/resolve-color customization-color theme))
(def info
{:flex-direction :row
:align-items :center})
(def token-info
{:height 40})
(def token-image
{:width 32
:height 32
:border-width 1
:border-radius 16
:border-color colors/neutral-80-opa-5
:margin-right 8})
(def values-container
{:align-items :flex-end})
(defn fiat-value
[theme]
{:color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)})
@@ -0,0 +1,62 @@
(ns quo.components.list-items.token-network.view
(:require
[quo.components.icon :as icon]
[quo.components.list-items.preview-list.view :as preview-list]
[quo.components.list-items.token-network.style :as style]
[quo.components.markdown.text :as text]
[quo.theme :as quo.theme]
[react-native.core :as rn]
[reagent.core :as reagent]))
(defn- info
[{:keys [token label networks]}]
[rn/view {:style style/info}
[rn/image
{:source (or (:source token) token)
:style style/token-image}]
[rn/view {:style style/token-info}
[text/text {:weight :semi-bold} label]
[preview-list/view
{:type :network
:size :size-14
:number 3}
networks]]])
(defn- values
[{:keys [state token-value fiat-value customization-color theme]}]
(if (= state :selected)
[icon/icon :i/check
{:color (style/check-color customization-color theme)
:accessibility-label :check-icon}]
[rn/view {:style style/values-container}
[text/text
{:weight :medium
:size :paragraph-2}
token-value]
[text/text
{:style (style/fiat-value theme)
:size :paragraph-2}
fiat-value]]))
(defn- view-internal
[]
(let [pressed? (reagent/atom false)
on-press-in #(reset! pressed? true)
on-press-out #(reset! pressed? false)]
(fn [{:keys [on-press state customization-color
_token _networks _token-value _fiat-value theme]
:as props
:or {customization-color :blue}}]
(let [internal-state (if @pressed?
:pressed
state)]
[rn/pressable
{:style (style/container internal-state customization-color theme)
:on-press-in on-press-in
:on-press-out on-press-out
:on-press on-press
:accessibility-label :token-network}
[info props]
[values props]]))))
(def view (quo.theme/with-theme view-internal))
@@ -14,7 +14,7 @@
(defn- internal-view
[]
(let [state (reagent/atom :default)]
(fn [{:keys [theme customization-color status token metrics? values on-press]}]
(fn [{:keys [theme customization-color status token metrics? values on-press on-long-press]}]
(let [bg-opacity (case @state
:active 10
:pressed 5
@@ -28,6 +28,7 @@
(reset! state :active)
(js/setTimeout #(reset! state :default) 300)
on-press)
:on-long-press on-long-press
:accessibility-label :container}
[rn/view
{:style {:flex-direction :row
@@ -95,25 +95,12 @@
notification-count
activity-center-on-press
scan-on-press
qr-code-on-press
for-qa-only-cellular-network
for-qa-only-no-network
for-qa-only-network-type]
qr-code-on-press]
:as props}]
(let [button-common-props (get-button-common-props {:theme theme
:jump-to? jump-to?
:blur? blur?})]
[rn/view {:style style/right-section}
(when (= for-qa-only-network-type "cellular")
[button/button
(merge (dissoc button-common-props :icon-only?)
for-qa-only-cellular-network)
"🦄"])
(when (= for-qa-only-network-type "none")
[button/button
(merge (dissoc button-common-props :icon-only?)
for-qa-only-no-network)
"💀"])
[button/button
(assoc button-common-props :accessibility-label :open-scanner-button :on-press scan-on-press)
:i/scan]
@@ -160,8 +147,5 @@
:qr-code-on-press callback
:notification-count number
:max-unread-notifications used to specify max number for counter
:for-qa-only-cellular-network used for testing purposed
:for-qa-only-no-network used for testing purposed
:for-qa-only-network-type used for testing purposed
"
(quo.theme/with-theme view-internal))
@@ -9,12 +9,13 @@
(defn- category-internal
[{:keys [label data blur? theme]}]
[rn/view {:style style/container}
[text/text
{:weight :medium
:size :paragraph-2
:style {:color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)}}
label]
[rn/view {:style (style/container label)}
(when label
[text/text
{:weight :medium
:size :paragraph-2
:style {:color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)}}
label])
[rn/flat-list
{:data data
:style (style/settings-items theme blur?)
@@ -2,11 +2,12 @@
(:require
[quo.foundations.colors :as colors]))
(def container
(defn container
[label]
{:left 0
:right 0
:padding-horizontal 20
:padding-top 12
:padding-top (when label 12)
:padding-bottom 8})
(defn settings-items
@@ -97,7 +97,9 @@
{:type :outline
:size 24})
(:button-text action-props)]
:selector [selectors/toggle action-props]
:selector (if (= (:type action-props) :checkbox)
[selectors/checkbox action-props]
[selectors/toggle action-props])
nil)])
(defn- internal-view
@@ -1,34 +1,119 @@
(ns quo.components.share.share-qr-code.component-spec
(:require
[quo.components.share.share-qr-code.view :as share-qr-code]
[test-helpers.component :as h]))
(:require [quo.components.share.share-qr-code.view :as share-qr-code]
[test-helpers.component :as h]))
(defn render-share-qr-code
[{share-qr-type :type :as props}]
(let [component-rendered (h/render [share-qr-code/view {:type share-qr-type}])
rerender-fn (h/get-rerender-fn component-rendered)
share-qr-code (h/get-by-label-text :share-qr-code)]
;; Fires on-layout since it's needed to render the content
(h/fire-event :layout share-qr-code #js {:nativeEvent #js {:layout #js {:width 500}}})
(rerender-fn [share-qr-code/view props])))
(h/describe "Share QR Code component"
(h/test "renders share qr code component"
(h/render [share-qr-code/view
{:link-title " A test title"}])
(-> (js/expect (h/get-by-text "A test title"))
(.toBeTruthy)))
(h/describe "Renders share-qr-code component in all types"
(let [qr-label "Text shown below QR"]
(h/test "Profile"
(render-share-qr-code {:type :profile
:qr-data qr-label})
(h/is-truthy (h/get-by-text qr-label)))
(h/test "renders share qr code url"
(h/render [share-qr-code/view
{:qr-url " A test url"}])
(-> (js/expect (h/get-by-text "A test url"))
(.toBeTruthy)))
(h/test "Wallet Legacy"
(render-share-qr-code {:type :wallet-legacy
:qr-data qr-label
:emoji "👻"})
(h/is-truthy (h/get-by-text qr-label)))
(h/test "on press link event fires"
(let [event (h/mock-fn)]
(h/render [share-qr-code/view
{:url-on-press event
:qr-url " A test url"}])
(h/fire-event :press (h/get-by-text "A test url"))
(-> (js/expect event)
(.toHaveBeenCalledTimes 1))))
(h/test "Wallet Multichain"
(render-share-qr-code {:type :wallet-multichain
:qr-data qr-label
:emoji "👻"})
(h/is-truthy (h/get-by-text qr-label)))))
(h/test "on press share event fires"
(let [event (h/mock-fn)]
(h/render [share-qr-code/view
{:share-on-press event}])
(h/fire-event :press (h/get-by-label-text :share-profile))
(-> (js/expect event)
(.toHaveBeenCalledTimes 1)))))
(h/describe "Fires all events for all types"
(letfn [(test-fire-events [props test-seq]
(doseq [{:keys [test-name event-name
callback-prop-key
accessibility-label]} test-seq
:let [event-fn (h/mock-fn)]]
(h/test test-name
(render-share-qr-code (assoc props callback-prop-key event-fn))
(h/fire-event event-name (h/get-by-label-text accessibility-label))
(h/was-called-times event-fn 1))))]
(h/describe "Profile"
(test-fire-events
{:type :profile}
[{:test-name "Text pressed"
:accessibility-label :share-qr-code-info-text
:event-name :press
:callback-prop-key :on-text-press}
{:test-name "Text long pressed"
:accessibility-label :share-qr-code-info-text
:event-name :long-press
:callback-prop-key :on-text-long-press}
{:test-name "Share button"
:accessibility-label :link-to-profile
:event-name :press
:callback-prop-key :on-share-press}]))
(h/describe "Wallet Legacy"
(test-fire-events
{:type :wallet-legacy :emoji "👽"}
[{:test-name "Text pressed"
:accessibility-label :share-qr-code-info-text
:event-name :press
:callback-prop-key :on-text-press}
{:test-name "Text long pressed"
:accessibility-label :share-qr-code-info-text
:event-name :long-press
:callback-prop-key :on-text-long-press}
{:test-name "Share button pressed"
:accessibility-label :link-to-profile
:event-name :press
:callback-prop-key :on-share-press}
{:test-name "Info icon pressed"
:accessibility-label :share-qr-code-info-icon
:event-name :press
:callback-prop-key :on-info-press}
{:test-name "Legacy tab pressed"
:accessibility-label :share-qr-code-legacy-tab
:event-name :press
:callback-prop-key :on-legacy-press}
{:test-name "Multichain tab pressed"
:accessibility-label :share-qr-code-multichain-tab
:event-name :press
:callback-prop-key :on-multichain-press}]))
(h/describe "Wallet Multichain"
(test-fire-events
{:type :wallet-multichain :emoji "👽"}
[{:test-name "Text pressed"
:accessibility-label :share-qr-code-info-text
:event-name :press
:callback-prop-key :on-text-press}
{:test-name "Text long pressed"
:accessibility-label :share-qr-code-info-text
:event-name :long-press
:callback-prop-key :on-text-long-press}
{:test-name "Share button pressed"
:accessibility-label :link-to-profile
:event-name :press
:callback-prop-key :on-share-press}
{:test-name "Info icon pressed"
:accessibility-label :share-qr-code-info-icon
:event-name :press
:callback-prop-key :on-info-press}
{:test-name "Legacy tab pressed"
:accessibility-label :share-qr-code-legacy-tab
:event-name :press
:callback-prop-key :on-legacy-press}
{:test-name "Multichain tab pressed"
:accessibility-label :share-qr-code-multichain-tab
:event-name :press
:callback-prop-key :on-multichain-press}
{:test-name "Settings pressed"
:accessibility-label :share-qr-code-settings
:event-name :press
:callback-prop-key :on-settings-press}])))))
+105 -34
View File
@@ -1,45 +1,116 @@
(ns quo.components.share.share-qr-code.style
(:require
[quo.foundations.colors :as colors]))
(:require [quo.foundations.colors :as colors]))
(def qr-code-container
{:padding-top 12
:padding-horizontal 12
:padding-bottom 8
:border-radius 16
:background-color colors/white-opa-5
:flex-direction :column
:justify-content :center
:align-items :center})
(def outer-container
{:border-radius 16
:width "100%"
:overflow :hidden})
(def profile-address-column
{:margin-horizontal :auto
:flex 4})
(def overlay-color colors/white-opa-5)
(def profile-address-container
(def ^:private padding-horizontal 12)
(def content-container
{:z-index 1
:padding-horizontal padding-horizontal
:padding-top 12
:padding-bottom 8})
;;; Header
(def header-container
{:flex-direction :row
:margin-bottom 12})
(def header-tab-active {:background-color colors/white-opa-20})
(def header-tab-inactive {:background-color colors/white-opa-5})
(def space-between-tabs {:width 8})
(def info-icon
{:margin-left :auto
:align-self :center})
(def info-icon-color colors/white-opa-40)
;;; QR code
(defn qr-code-size
[total-width]
(- total-width (* 2 padding-horizontal)))
;;; Bottom part
(def bottom-container
{:margin-top 8
:flex-direction :row
:justify-content :space-between})
(def title {:color colors/white-opa-40})
(def share-button-size 32)
(def ^:private share-button-gap 16)
(defn share-button-container
[alignment]
{:justify-content (if (= alignment :top) :flex-start :center)
:margin-left share-button-gap})
(defn data-text
[total-width]
{:width (- total-width (* 2 padding-horizontal) share-button-size share-button-gap)})
;;; Wallet variants
(def wallet-data-and-share-container
{:margin-top 2
:flex-direction :row
:justify-content :space-between})
(def wallet-legacy-container {:flex 1})
(def wallet-multichain-container {:flex 1 :margin-top 4})
(def wallet-multichain-networks
{:flex-direction :row
:justify-content :space-between
:margin-top 6})
:margin-bottom 8})
(def profile-address-content-container
{:padding-top 2
:align-self :flex-start})
(def wallet-multichain-data-container {:margin-top 4})
(def profile-address-content
{:color colors/white})
;;; Dashed line
(def divider-container
{:height 8
:margin-horizontal 4
:justify-content :center
:overflow :hidden})
(def profile-address-label
{:color colors/white-opa-40})
(def ^:private padding-for-divider (+ padding-horizontal 4))
(def ^:private dashed-line-width 2)
(def ^:private dashed-line-space 4)
(def share-button-container
{:flex 1
:flex-direction :column
:justify-content :center
:align-items :flex-end})
(def dashed-line
{:flex-direction :row
:margin-left -1})
(def icon-container
{:height 36
:flex-direction :row
:align-items :center
:justify-content :space-between
:padding-bottom 12})
(def line
{:background-color colors/white-opa-20
:width dashed-line-width
:height 1})
(def line-space
{:width dashed-line-space
:height 1})
(defn number-lines-and-spaces-to-fill
[component-width]
(let [line-and-space-width (+ dashed-line-width dashed-line-space)
width-to-fill (- component-width (* 2 padding-for-divider))
number-of-lines (* (/ width-to-fill line-and-space-width) 2)]
(inc (int number-of-lines))))
(def ^:private get-network-full-name
{"eth" :ethereum
"opt" :optimism
"arb1" :arbitrum})
(defn network-short-name-text
[network-short-name]
{:color (-> network-short-name
(get-network-full-name :unknown)
(colors/resolve-color nil))})
+246 -43
View File
@@ -1,46 +1,249 @@
(ns quo.components.share.share-qr-code.view
(:require
[quo.components.buttons.button.view :as button]
[quo.components.markdown.text :as text]
[quo.components.share.qr-code.view :as qr-code]
[quo.components.share.share-qr-code.style :as style]
[quo.foundations.colors :as colors]
[react-native.blur :as blur]
[react-native.core :as rn]))
(:require [clojure.set]
[clojure.string :as string]
[oops.core :as oops]
[quo.components.buttons.button.view :as button]
[quo.components.icon :as icon]
[quo.components.list-items.preview-list.view :as preview-list]
[quo.components.markdown.text :as text]
[quo.components.share.qr-code.view :as qr-code]
[quo.components.share.share-qr-code.style :as style]
[quo.components.tabs.tab.view :as tab]
[quo.foundations.resources :as quo.resources]
[quo.theme]
[react-native.blur :as blur]
[react-native.core :as rn]
[react-native.platform :as platform]
[reagent.core :as reagent]
[utils.i18n :as i18n]))
(defn- line [] [rn/view {:style style/line}])
(defn- space [] [rn/view {:style style/line-space}])
(defn- dashed-line
[width]
(into [rn/view {:style style/dashed-line}]
(take (style/number-lines-and-spaces-to-fill width))
(cycle [[line] [space]])))
(defn- header
[{:keys [share-qr-type on-info-press on-legacy-press on-multichain-press]}]
[rn/view {:style style/header-container}
[tab/view
{:accessibility-label :share-qr-code-legacy-tab
:id :wallet-legacy-tab
:active-item-container-style style/header-tab-active
:item-container-style style/header-tab-inactive
:size 24
:active (= :wallet-legacy share-qr-type)
:on-press on-legacy-press}
(i18n/label :t/legacy)]
[rn/view {:style style/space-between-tabs}]
[tab/view
{:accessibility-label :share-qr-code-multichain-tab
:id :wallet-multichain-tab
:active-item-container-style style/header-tab-active
:item-container-style style/header-tab-inactive
:size 24
:active (= :wallet-multichain share-qr-type)
:on-press on-multichain-press}
(i18n/label :t/multichain)]
[rn/pressable
{:accessibility-label :share-qr-code-info-icon
:style style/info-icon
:on-press on-info-press
:hit-slop 6}
[icon/icon :i/info
{:size 20
:color style/info-icon-color}]]])
(defn- info-label
[share-qr-code-type]
[text/text {:size :paragraph-2 :weight :medium :style style/title}
(if (= share-qr-code-type :profile)
(i18n/label :t/link-to-profile)
(i18n/label :t/wallet-address))])
(defn- info-text
[{:keys [width on-press on-long-press ellipsize?]} qr-data-text]
[rn/pressable
{:accessibility-label :share-qr-code-info-text
:style (style/data-text width)
:on-press on-press
:on-long-press on-long-press}
[text/text
(cond-> {:size :paragraph-1
:weight :monospace}
ellipsize? (assoc :number-of-lines 1
:ellipsize-mode :middle))
qr-data-text]])
(defn- share-button
[{:keys [alignment on-press]}]
[rn/view {:style (style/share-button-container alignment)}
[button/button
{:icon-only? true
:type :grey
:background :blur
:size style/share-button-size
:accessibility-label :link-to-profile
:on-press on-press}
:i/share]])
(defn- network-colored-text
[network-short-name]
[text/text {:style (style/network-short-name-text network-short-name)}
(str network-short-name ":")])
(defn- wallet-multichain-colored-address
[full-address]
(let [[networks address] (as-> full-address $
(string/split $ ":")
[(butlast $) (last $)])
->network-hiccup-xf (map #(vector network-colored-text %))]
(as-> networks $
(into [:<>] ->network-hiccup-xf $)
(conj $ address))))
(defn- profile-bottom
[{:keys [component-width qr-data on-text-press on-text-long-press on-share-press share-qr-type]}]
[:<>
[rn/view
[info-label share-qr-type]
[info-text
{:width component-width
:ellipsize? true
:on-press on-text-press
:on-long-press on-text-long-press}
qr-data]]
[share-button
{:alignment :center
:on-press on-share-press}]])
(defn- wallet-legacy-bottom
[{:keys [share-qr-type component-width qr-data on-text-press on-text-long-press on-share-press]}]
[rn/view {:style style/wallet-legacy-container}
[info-label share-qr-type]
[rn/view {:style style/wallet-data-and-share-container}
[info-text
{:width component-width
:on-press on-text-press
:on-long-press on-text-long-press}
qr-data]
[share-button
{:alignment :top
:on-press on-share-press}]]])
(def ^:private known-networks #{:ethereum :optimism :arbitrum})
(defn- get-network-image-source
[network]
{:source (quo.resources/get-network (get known-networks network :unknown))})
(defn wallet-multichain-bottom
[{:keys [share-qr-type component-width qr-data on-text-press on-text-long-press
on-share-press networks on-settings-press]}]
[rn/view {:style style/wallet-multichain-container}
[rn/view {:style style/wallet-multichain-networks}
[preview-list/view {:type :network :size :size-32}
(map get-network-image-source networks)]
[button/button
{:icon-only? true
:type :grey
:background :blur
:size 32
:accessibility-label :share-qr-code-settings
:on-press on-settings-press}
:i/advanced]]
[rn/view {:style style/divider-container}
[dashed-line component-width]]
[rn/view {:style style/wallet-multichain-data-container}
[info-label share-qr-type]
[rn/view {:style style/wallet-data-and-share-container}
[info-text
{:width component-width
:on-press on-text-press
:on-long-press on-text-long-press}
[wallet-multichain-colored-address qr-data]]
[share-button
{:alignment :top
:on-press on-share-press}]]]])
(defn- share-qr-code
[{:keys [share-qr-type qr-image-uri component-width customization-color full-name
profile-picture emoji]
:as props}]
[rn/view {:style style/content-container}
(when (#{:wallet-legacy :wallet-multichain} share-qr-type)
[header props])
[quo.theme/provider {:theme :light}
[qr-code/view
{:qr-image-uri qr-image-uri
:size (style/qr-code-size component-width)
:avatar (if (= share-qr-type :profile)
:profile
:wallet-account)
:customization-color customization-color
:full-name full-name
:profile-picture profile-picture
:emoji emoji}]]
[rn/view {:style style/bottom-container}
(case share-qr-type
:profile [profile-bottom props]
:wallet-legacy [wallet-legacy-bottom props]
:wallet-multichain [wallet-multichain-bottom props]
nil)]])
(defn view
[{:keys [qr-image-uri link-title url-on-press url-on-long-press qr-url share-on-press]}]
[blur/ios-view
{:style style/qr-code-container
:blur-type :light}
[qr-code/view {:qr-image-uri qr-image-uri}]
[rn/view {:style style/profile-address-container}
[rn/view {:style style/profile-address-column}
[text/text
{:size :paragraph-2
:weight :medium
:style style/profile-address-label}
link-title]
[rn/touchable-highlight
{:active-opacity 1
:underlay-color colors/neutral-80-opa-1-blur
:background-color :transparent
:on-press url-on-press
:on-long-press url-on-long-press
:style style/profile-address-content-container}
[text/text
{:style style/profile-address-content
:size :paragraph-1
:weight :medium
:ellipsize-mode :middle
:number-of-lines 1}
qr-url]]]
[rn/view {:style style/share-button-container}
[button/button
{:icon-only? true
:type :grey
:background :blur
:size 32
:accessibility-label :share-profile
:on-press share-on-press}
:i/share]]]])
"Receives the following properties:
- type: :profile | :wallet-legacy | :wallet-multichain
- qr-image-uri: Image source value.
- qr-data: Text to show below the QR code.
- on-text-press: Callback for the `qr-data` text.
- on-text-long-press: Callback for the `qr-data` text.
- on-share-press: Callback for the share button.
- customization-color: Custom color for the QR code component.
- unblur-on-android?: [Android only] disables blur for this component.
Depending on the `type`, different properties are accepted:
`:profile`
- full-name: User full name.
- profile-picture: map ({:source image-source}) or any image source.
`:wallet-legacy`
- emoji: Emoji in a string to show in the QR code.
- on-info-press: Callback for the info icon.
- on-legacy-press: Callback for the legacy tab.
- on-multichain-press: Callback for the multichain tab.
`:wallet-multichain`
- networks: A vector of network names as keywords (`[:ethereum, :my-net, ...]`).
- on-settings-press: Callback for the settings button.
- emoji: Emoji in a string to show in the QR code.
- on-info-press: Callback for the info icon.
- on-legacy-press: Callback for the legacy tab.
- on-multichain-press: Callback for the multichain tab.
WARNING on Android:
Sometimes while using a blur layer on top of another on Android, this component looks
bad because of the `blur/view`, so we can set `unblur-on-android? true` to fix it.
"
[{:keys [unblur-on-android?] :as props}]
(reagent/with-let [component-width (reagent/atom nil)
container-component (if (and platform/android? unblur-on-android?)
[rn/view {:background-color style/overlay-color}]
[blur/view
{:blur-radius 20
:blur-amount 20
:blur-type :transparent
:overlay-color style/overlay-color
:background-color style/overlay-color}])]
[quo.theme/provider {:theme :dark}
[rn/view
{:accessibility-label :share-qr-code
:style style/outer-container
:on-layout #(reset! component-width (oops/oget % "nativeEvent.layout.width"))}
(conj container-component
(when @component-width
[share-qr-code
(-> props
(assoc :component-width @component-width)
(clojure.set/rename-keys {:type :share-qr-type}))]))]]))
-124
View File
@@ -1,124 +0,0 @@
(ns quo.components.tags.token-tag
(:require
[quo.components.icon :as icons]
[quo.components.markdown.text :as text]
[quo.foundations.colors :as colors]
[quo.theme :as theme]
[react-native.core :as rn]))
(def themes
{:light {:background-color colors/neutral-20}
:dark {:background-color colors/neutral-80}})
(defn get-value-from-size
[size big-option small-option]
(if (= size :big) big-option small-option))
(def icon-container-styles
{:display :flex
:align-items :center
:justify-content :center
:position :absolute
:border-radius 20
:margin-left 2})
(defn tag-container
[size]
{:height (get-value-from-size size 32 24)
:align-items :center
:flex-direction :row
:border-radius 20})
(defn tag
"[tag opts \"label\"]]
opts
{
:size :small/:big
:token-img-src :token-img-src
:token-img-style {}
:border-color :color
:overlay child-elements
}"
[_ _]
(fn [{:keys [size img-src img-style border-color overlay]
:or {size :small}}
label]
[rn/view
{:style (when border-color
{:border-color border-color
:border-radius 20
:border-width 1})}
[rn/view
{:style (merge (tag-container size) (get themes (theme/get-theme)))}
[rn/image
{:src img-src
:style (merge
{:height (get-value-from-size size 28 20)
:width (get-value-from-size size 28 20)
:margin-left 2
:margin-right (get-value-from-size size 8 6)}
img-style)}]
[text/text
{:weight :medium
:number-of-lines 1
:style
{:margin-right (get-value-from-size size 12 11)}
:size (get-value-from-size size :paragraph-2 :label)} label]
overlay]]))
(defn loading-icon
[]
[rn/view
{:style {:align-items :center
:justify-content :center
:position :absolute
:right -8
:top -8}}
[icons/icon :t/checktoken
{:no-color true
:size 20}]])
(defn icon
[size border-color sufficient?]
[rn/view
{:style (merge
icon-container-styles
{:background-color border-color
:border-color (if (= (theme/get-theme) :dark) colors/neutral-100 colors/white)
:border-width 1
:right (get-value-from-size size -3.75 -5.75)
:bottom (get-value-from-size size (- 32 7.75 4) (- 24 7.75 2))})}
[icons/icon (if sufficient? :i/hold :i/add)
{:no-color true
:size 12}]])
(defn token-tag
"[token-tag opts]
opts
{
:symbol string
:value string
:size :small/:big
:token-img-src :token-img-src
:border-color :color
:sufficient? true/false
:purchasable? true/false
:loading? true/false
}"
[_ _]
(fn [{:keys [value size img-src border-color purchasable? sufficient? loading?]
:or {size :small}
:as props}]
(let [sym (:symbol props)
sufficient? (when-not loading? sufficient?)
border-color (if sufficient? colors/success-50 border-color)]
[tag
{:size size
:img-src img-src
:border-color (if sufficient? colors/success-50 border-color)
:overlay
(if loading?
[loading-icon]
(when (or purchasable? sufficient?)
[icon size border-color sufficient?]))}
(str value " " sym)])))
@@ -0,0 +1,49 @@
(ns quo.components.tags.token-tag.style
(:require [quo.foundations.colors :as colors]))
(defn container
[size options blur? theme]
(let [hold? (= options :hold)]
(merge {:background-color (if blur?
(colors/theme-colors colors/neutral-80-opa-5 colors/white-opa-5 theme)
(colors/theme-colors colors/neutral-10 colors/neutral-90 theme))
:flex-direction :row
:align-items :center
:padding-left 2
:border-width (if hold? 1 0)
:border-radius 20
:border-color (colors/theme-colors colors/success-50 colors/success-60 theme)}
(condp = size
:size-24 {:height (if hold? 26 24)
:padding-right 10
:border-radius (if hold? 13 12)}
:size-32 {:height (if hold? 34 32)
:padding-right 12
:border-radius (if hold? 17 16)}))))
(defn options-icon
[size]
(assoc
(condp = size
:size-24 {:right -8
:top -8}
:size-32 {:right -6
:top -6})
:position
:absolute))
(defn token-img
[size]
(condp = size
:size-24 {:width 20
:height 20
:margin-right 6
:border-radius 10}
:size-32 {:width 28
:height 28
:margin-right 8
:border-radius 14}))
(defn label
[theme]
{:color (colors/theme-colors colors/neutral-100 colors/white theme)})
@@ -0,0 +1,57 @@
(ns quo.components.tags.token-tag.view
(:require
[oops.core :refer [oget]]
[quo.components.icon :as icons]
[quo.components.markdown.text :as text]
[quo.components.tags.token-tag.style :as style]
[quo.theme :as quo.theme]
[react-native.core :as rn]
[react-native.hole-view :as hole-view]
[reagent.core :as reagent]))
(defn- view-internal
"Options:
- :options - false / :add / :hold (default false)
- :size - :size-24 / :size-32 (default :size-24)
- :blur? - boolean (default false)
- :theme - :light / :dark
- :token-img-src - token image source
- :token-value - string - token value
- :token-symbol - string"
[]
(let [container-width (reagent/atom 0)]
(fn [{:keys [options size blur? theme token-img-src token-value token-symbol]
:or {size :size-24}}]
[rn/view
{:on-layout #(reset! container-width
(oget % :nativeEvent :layout :width))}
[hole-view/hole-view
{:holes (if options
[{:x (- @container-width
(condp = size
:size-24 10
:size-32 12))
:y (condp = size
:size-24 -6
:size-32 -4)
:width 16
:height 16
:borderRadius 8}]
[])}
[rn/view
{:style (style/container size options blur? theme)}
[rn/image
{:style (style/token-img size)
:source token-img-src}]
[text/text
{:size :paragraph-2
:weight :medium
:style (style/label theme)}
(str token-value " " token-symbol)]]]
(when options
[rn/view {:style (style/options-icon size)}
[icons/icon (if (= options :hold) :i/hold :i/add-token)
{:size 20
:no-color true}]])])))
(def view (quo.theme/with-theme view-internal))
@@ -7,7 +7,7 @@
(def empty-username "Account 1")
(defn get-test-data
[type watch-only? empty-type? loading? metrics?]
[{:keys [type watch-only? empty-type? loading? no-metrics?]}]
{:name (if empty-type? empty-username username)
:balance "€1,000.00"
:percentage-value "50%"
@@ -15,17 +15,18 @@
:customization-color :blue
:watch-only? watch-only?
:loading? loading?
:metrics? metrics?
:metrics? (not no-metrics?)
:type type})
(h/describe "Account_card tests"
(h/test "Renders Default"
(let [data (get-test-data :default false false false true)]
(let [data (get-test-data {:type :default})]
(h/render [account-card/view data])
(h/is-truthy (h/get-by-text username))))
(h/test "Renders Watch-Only"
(let [data (get-test-data :watch-only true false false true)]
(let [data (get-test-data {:type :watch-only
:watch-only? true})]
(h/render [account-card/view data])
(h/is-truthy (h/get-by-text username))))
@@ -35,10 +36,16 @@
(h/is-truthy (h/get-by-label-text :add-account))))
(h/test "Renders Empty"
(let [data (get-test-data :empty false true false true)]
(let [data (get-test-data {:type :empty
:empty-type? true})]
(h/render [account-card/view data])
(h/is-truthy (h/get-by-text empty-username))))
(h/test "Renders Missing Keypair"
(let [data (get-test-data {:type :missing-keypair})]
(h/render [account-card/view data])
(h/is-truthy (h/get-by-text username))))
(h/test "Add account on press fires correctly"
(let [on-press (h/mock-fn)
data {:type :add-account
@@ -48,16 +55,20 @@
(h/was-called on-press)))
(h/test "Renders component without metrics"
(let [data (get-test-data :default false false false false)]
(let [data (get-test-data {:type :default
:no-metrics? true})]
(h/render [account-card/view data])
(h/is-falsy (h/query-by-label-text :metrics))))
(h/test "Renders loading state"
(let [data (get-test-data :default false false true true)]
(let [data (get-test-data {:type :default
:loading? true})]
(h/render [account-card/view data])
(h/is-truthy (h/get-by-label-text :loading))))
(h/test "Renders loading state without metrics"
(let [data (get-test-data :default false false true false)]
(let [data (get-test-data {:type :default
:no-metrics? true
:loading? true})]
(h/render [account-card/view data])
(h/is-falsy (h/query-by-label-text :metrics)))))
@@ -0,0 +1,20 @@
(ns quo.components.wallet.account-card.properties
(:require [quo.foundations.colors :as colors]))
(defn gradient-start-color
[theme customization-color]
(colors/theme-colors
(colors/resolve-color customization-color theme 0)
colors/neutral-95
theme))
(defn gradient-end-color
[theme customization-color]
(colors/theme-colors
(colors/resolve-color customization-color theme 6)
colors/neutral-95
theme))
(defn alert-icon-color
[theme]
(colors/theme-colors colors/neutral-50 colors/white theme))
@@ -3,24 +3,29 @@
[quo.foundations.colors :as colors]))
(defn text-color
[watch-only? theme]
(if (and watch-only? (= :light theme))
[type theme]
(if (and (or (= :missing-keypair type)
(= :watch-only type))
(= :light theme))
colors/neutral-100
colors/white))
(defn card
[{:keys [customization-color watch-only? metrics? theme pressed?]}]
[{:keys [customization-color type theme pressed?]}]
{:width 162
:height (if metrics? 88 68)
:background-color (if watch-only?
(colors/theme-colors colors/neutral-80-opa-5 colors/neutral-95 theme)
:background-color (when (not= :watch-only type)
(colors/theme-colors
(colors/custom-color customization-color 50)
(colors/custom-color customization-color 60)
(colors/resolve-color customization-color
theme
(when (= :missing-keypair type) (if pressed? 20 10)))
(colors/resolve-color customization-color
theme
(when (= :missing-keypair type) (if pressed? 30 20)))
theme))
:border-radius 16
:border-width 1
:border-color (if watch-only?
:border-color (if (or (= :missing-keypair type)
(= :watch-only type))
(colors/theme-colors
(if pressed? colors/neutral-80-opa-10 colors/neutral-80-opa-5)
(if pressed? colors/white-opa-10 colors/white-opa-5)
@@ -28,10 +33,10 @@
colors/neutral-80-opa-10)
:padding-horizontal 12
:padding-top 6
:padding-bottom 10})
:padding-bottom 9})
(def profile-container
{:margin-bottom 6
{:margin-bottom 8
:flex-direction :row})
(def metrics-container
@@ -39,8 +44,8 @@
:align-items :center})
(defn account-name
[watch-only? theme]
{:color (text-color watch-only? theme)
[type theme]
{:color (text-color type theme)
:margin-left 2})
(def watch-only-container
@@ -50,21 +55,25 @@
:flex 1})
(defn account-value
[watch-only? theme]
{:color (text-color watch-only? theme)})
[type theme]
{:color (text-color type theme)})
(defn metrics
[watch-only? theme]
{:color (if (and watch-only? (= :light theme))
[type theme]
{:color (if (and (or (= :missing-keypair type)
(= :watch-only type))
(= :light theme))
colors/neutral-80-opa-60
colors/white-opa-70)})
(defn separator
[watch-only? theme]
[type theme]
{:width 2
:height 2
:border-radius 20
:background-color (if (and watch-only? (= :light theme))
:background-color (if (and (or (= :missing-keypair type)
(= :watch-only type))
(= :light theme))
colors/neutral-80-opa-20
colors/white-opa-40)
:margin-horizontal 4})
@@ -102,3 +111,12 @@
(def metrics-icon-container
{:margin-left 4})
(def gradient-view
{:position :absolute
:bottom 0
:top 0
:left 0
:right 0
:border-radius 16
:z-index -1})
@@ -3,11 +3,13 @@
[quo.components.buttons.button.view :as button]
[quo.components.icon :as icon]
[quo.components.markdown.text :as text]
[quo.components.wallet.account-card.properties :as properties]
[quo.components.wallet.account-card.style :as style]
[quo.foundations.colors :as colors]
[quo.foundations.customization-colors :as customization-colors]
[quo.theme :as quo.theme]
[react-native.core :as rn]
[react-native.linear-gradient :as linear-gradient]
[reagent.core :as reagent]))
(defn- loading-view
@@ -17,8 +19,7 @@
[rn/view
{:accessibility-label :loading
:style (style/card {:customization-color customization-color
:watch-only? watch-only?
:metrics? metrics?
:type type
:theme theme
:pressed? false})}
[rn/view {:style style/loader-container}
@@ -54,31 +55,43 @@
10)}])]))
(defn- metrics-percentage
[watch-only? theme account-percentage]
[type theme account-percentage]
[text/text
{:weight :semi-bold
{:weight :medium
:size :paragraph-2
:accessibility-label :metrics
:style (style/metrics watch-only? theme)}
:style (style/metrics type theme)}
account-percentage])
(defn- metrics-info
[watch-only? theme account-amount]
[type theme account-amount]
[:<>
[rn/view (style/separator watch-only? theme)]
[rn/view (style/separator type theme)]
[text/text
{:weight :semi-bold
{:weight :medium
:size :paragraph-2
:style (style/metrics watch-only? theme)}
:style (style/metrics type theme)}
account-amount]
[rn/view {:style style/metrics-icon-container}
[icon/icon
:i/positive
{:color (colors/theme-colors (if watch-only? colors/neutral-50 colors/white-opa-70)
{:color (colors/theme-colors (if (or (= :missing-keypair type)
(= :watch-only type))
colors/neutral-50
colors/white-opa-70)
colors/white-opa-70
theme)
:size 16}]]])
(defn- gradient-overview
[theme customization-color]
[linear-gradient/linear-gradient
{:colors [(properties/gradient-start-color theme customization-color)
(properties/gradient-end-color theme customization-color)]
:style style/gradient-view
:start {:x 0 :y 0}
:end {:x 1 :y 0}}])
(defn- user-account
[]
(let [pressed? (reagent/atom false)
@@ -86,7 +99,8 @@
on-press-out #(reset! pressed? false)]
(fn [{:keys [name balance percentage-value loading? amount customization-color type emoji metrics?
theme on-press]}]
(let [watch-only? (= :watch-only type)]
(let [watch-only? (= :watch-only type)
missing-keypair? (= :missing-keypair type)]
(if loading?
[loading-view
{:customization-color customization-color
@@ -97,12 +111,11 @@
{:on-press-in on-press-in
:on-press-out on-press-out
:style (style/card {:customization-color customization-color
:watch-only? watch-only?
:metrics? metrics?
:type type
:theme theme
:pressed? @pressed?})
:on-press on-press}
(when (and customization-color (not watch-only?))
(when (and customization-color (and (not watch-only?) (not missing-keypair?)))
[customization-colors/overlay
{:customization-color customization-color
:border-radius 16
@@ -115,19 +128,23 @@
[text/text
{:size :paragraph-2
:weight :medium
:style (style/account-name watch-only? theme)}
:style (style/account-name type theme)}
name]
(when watch-only? [icon/icon :i/reveal {:color colors/neutral-50 :size 12}])]]
(when watch-only? [icon/icon :i/reveal {:color colors/neutral-50 :size 12}])
(when missing-keypair?
[icon/icon :i/alert {:color (properties/alert-icon-color theme) :size 12}])]]
[text/text
{:size :heading-2
:weight :semi-bold
:style (style/account-value watch-only? theme)}
:style (style/account-value type theme)}
balance]
(when metrics?
[rn/view {:style style/metrics-container}
[metrics-percentage watch-only? theme percentage-value]
[metrics-percentage type theme percentage-value]
(when (not= :empty type)
[metrics-info watch-only? theme amount])])])))))
[metrics-info type theme amount])])
(when watch-only?
[gradient-overview theme customization-color])])))))
(defn- add-account-view
[]
@@ -156,10 +173,8 @@
(defn- view-internal
[{:keys [type] :as props}]
(case type
:watch-only [user-account props]
:add-account [add-account-view props]
:default [user-account props]
:empty [user-account props]
(:watch-only :default :empty :missing-keypair) [user-account props]
:add-account [add-account-view props]
nil))
(def view (quo.theme/with-theme view-internal))
@@ -0,0 +1,9 @@
(ns quo.components.wallet.address-text.style
(:require [quo.foundations.colors :as colors]))
(defn address-text
[format blur? theme]
(when (= format :short)
{:color (if blur?
colors/white-opa-40
(colors/theme-colors colors/neutral-50 colors/neutral-40 theme))}))
@@ -0,0 +1,31 @@
(ns quo.components.wallet.address-text.view
(:require [quo.components.markdown.text :as text]
[quo.components.wallet.address-text.style :as style]
[quo.foundations.colors :as colors]
[quo.theme]
[utils.address :as utils]))
(defn- colored-network-text
[theme network]
(let [{:keys [name short-name]} network]
[text/text
{:size :paragraph-2
:style {:color (colors/resolve-color name theme)}}
(str short-name ":")]))
(defn- view-internal
[{:keys [networks address blur? theme format]}]
(let [network-text-xf (map #(colored-network-text theme %))
address-text [text/text
{:size :paragraph-2
;; TODO: monospace font https://github.com/status-im/status-mobile/issues/17009
:weight :monospace
:style (style/address-text format blur? theme)}
(if (= format :short)
(utils/get-short-wallet-address address)
address)]]
(as-> networks $
(into [text/text] network-text-xf $)
(conj $ address-text))))
(def view (quo.theme/with-theme view-internal))
@@ -10,7 +10,8 @@
:type :default
:name "Trip to Vegas"
:address "0x0ah...71a"}
:networks [:ethereum :optimism]
:networks [{:name :ethereum :short-name "eth"}
{:name :optimism :short-name "opt"}]
:state :default
:action :none}])
@@ -0,0 +1,115 @@
(ns quo.components.wallet.network-routing.animation
(:require [react-native.reanimated :as reanimated]))
(def ^:private slider-timing 300)
(defn show-slider
[opacity-shared-value]
(reanimated/animate opacity-shared-value 1 slider-timing))
(defn hide-slider
[opacity-shared-value]
(reanimated/animate opacity-shared-value 0 slider-timing))
(defn increase-slider
[width-shared-value height-shared-value]
(reanimated/animate width-shared-value 8 slider-timing)
(reanimated/animate height-shared-value 40 slider-timing))
(defn decrease-slider
[width-shared-value height-shared-value]
(reanimated/animate width-shared-value 4 slider-timing)
(reanimated/animate height-shared-value 32 slider-timing))
(def ^:private pressed-bar-timing 600)
(defn move-previous-bars
[{:keys [bars bars-widths-negative]}]
(doseq [[bar-idx bar] (map-indexed vector bars)
:let [new-translation-x (->> (take (inc bar-idx) bars-widths-negative)
(reduce +)
(dec))]]
(reanimated/animate (:translate-x-shared-value bar)
new-translation-x
pressed-bar-timing)))
(defn move-pressed-bar
[{:keys [bars-widths-negative number-previous-bars]
{:keys [translate-x-shared-value]} :bar}]
(let [new-translation-x (reduce + (take number-previous-bars bars-widths-negative))]
(reanimated/animate translate-x-shared-value
new-translation-x
(- pressed-bar-timing 20))))
(defn move-next-bars
[{:keys [bars bars-widths-negative number-previous-bars extra-offset add-new-timeout]}]
(doseq [[bar-idx bar] (map-indexed vector bars)
:let [number-bars-before (+ number-previous-bars
(inc bar-idx))
new-translation-x (->> (take number-bars-before bars-widths-negative)
(reduce +)
(* 1.05))]]
(reanimated/animate (:translate-x-shared-value bar) new-translation-x pressed-bar-timing)
(add-new-timeout
(keyword (str "fix-next-bars-position-" bar-idx))
(fn []
(let [translate-x-value (reanimated/get-shared-value (:translate-x-shared-value bar))
hidden-position (- translate-x-value extra-offset)]
(reanimated/set-shared-value (:translate-x-shared-value bar) hidden-position)))
pressed-bar-timing)))
(def ^:private max-limit-bar-timing 300)
(defn show-max-limit-bar
[max-limit-bar-opacity]
(reanimated/animate max-limit-bar-opacity 1 max-limit-bar-timing))
(defn hide-max-limit-bar
[max-limit-bar-opacity]
(reanimated/animate max-limit-bar-opacity 0 max-limit-bar-timing))
(defn reset-bars-positions
[bars unlock-press-fn add-new-timeout]
(let [bars-reset-timing 500]
(doseq [{:keys [translate-x-shared-value]} bars]
(reanimated/animate translate-x-shared-value 0 bars-reset-timing))
(add-new-timeout :unlock-press unlock-press-fn bars-reset-timing)))
(defn align-bars-off-screen
[{:keys [new-network-values network-bars amount->width add-new-timeout]}]
(let [width-to-off-screen (->> new-network-values
(reduce #(- %1 (:amount %2)) 0)
(amount->width))]
(doseq [[bar-idx {new-amount :amount} bar] (map vector (range) new-network-values network-bars)]
(reanimated/set-shared-value (:amount-shared-value bar) new-amount)
(reanimated/set-shared-value (:translate-x-shared-value bar) (* 2 width-to-off-screen))
(add-new-timeout
(keyword (str "align-bar-" bar-idx))
#(reanimated/set-shared-value (:translate-x-shared-value bar) width-to-off-screen)
1))))
(def ^:private hide-bar-timing 400)
(defn hide-pressed-bar
[{:keys [translate-x-shared-value amount-shared-value]} amount->width]
(let [bar-width (amount->width (reanimated/get-shared-value amount-shared-value))
new-translation-x (- (reanimated/get-shared-value translate-x-shared-value)
bar-width)]
(reanimated/animate translate-x-shared-value new-translation-x hide-bar-timing)))
(defn update-bar-values-and-reset-animations
[{:keys [new-network-values network-bars amount->width reset-values-fn add-new-timeout
lock-press-fn unlock-press-fn]}]
(lock-press-fn)
(add-new-timeout
:update-bars-values
(fn []
(align-bars-off-screen {:new-network-values new-network-values
:network-bars network-bars
:amount->width amount->width
:add-new-timeout add-new-timeout})
(reset-values-fn)
(add-new-timeout :reset-bars
#(reset-bars-positions network-bars unlock-press-fn add-new-timeout)
100))
hide-bar-timing))
@@ -0,0 +1,28 @@
(ns quo.components.wallet.network-routing.component-spec
(:require [oops.core :as oops]
[quo.components.wallet.network-routing.view :as network-routing]
[reagent.core :as reagent]
[test-helpers.component :as h]))
(h/describe "Network-routing tests"
(let [network {:amount 250 :max-amount 300 :network-name :unknown}
default-props {:networks [network network network]
:total-amount 500
:requesting-data? false
:on-amount-selected (fn [_new-amount _network-idx] nil)}]
(h/test "Renders Default"
(h/render [network-routing/view default-props])
(h/is-truthy (h/get-by-label-text :network-routing)))
(h/test "Renders bars inside"
(let [component (h/render [network-routing/view default-props])
rerender-fn #((oops/oget component "rerender") (reagent/as-element %))
component (h/get-by-label-text :network-routing)]
;; Fires on-layout callback since the total width is required
(h/fire-event :layout component #js {:nativeEvent #js {:layout #js {:width 1000}}})
;; Update props to trigger rerender, otherwise it won't be updated
(rerender-fn [network-routing/view (assoc default-props :requesting-data? true)])
;; Check number of networks rendered
(->> (js->clj (h/query-all-by-label-text :network-routing-bar))
(count)
(h/is-equal 3))))))
@@ -0,0 +1,79 @@
(ns quo.components.wallet.network-routing.style
(:require [quo.foundations.colors :as colors]
[react-native.reanimated :as reanimated]))
(defn container
[container-style theme]
(assoc container-style
:flex-direction :row
:height 64
:background-color (colors/theme-colors colors/neutral-100-opa-5 colors/neutral-90 theme)
:border-radius 20
:overflow :hidden))
(defn max-limit-bar
[{:keys [opacity-shared-value width]}]
(reanimated/apply-animations-to-style
{:opacity opacity-shared-value}
{:position :absolute
:top 0
:bottom 0
:left 0
:width width
:z-index -1
:flex-direction :row}))
(defn max-limit-bar-background
[network-name]
{:flex 1
:background-color (colors/resolve-color network-name nil 10)})
(defn network-bar
[{:keys [max-width on-top? bar-division? theme]
{:keys [network-name translate-x-shared-value]} :bar}
width-shared-value]
(reanimated/apply-animations-to-style
{:width width-shared-value
:transform [{:translate-x translate-x-shared-value}]}
{:max-width max-width
:flex-direction :row
:justify-content :flex-end
:background-color (colors/resolve-color network-name nil)
:z-index (if on-top? 1 0)
:border-right-width (if bar-division? 0 1)
:border-color (colors/theme-colors colors/white colors/neutral-95 theme)}))
(def slider-container
{:width 40
:background-color :transparent
:justify-content :center
:align-items :center
:right -20})
(def ^:private slider-fixed-styles
{:background-color colors/white
:height 32
:width 4
:border-radius 4})
(defn slider
[{:keys [width-shared-value height-shared-value opacity-shared-value]}]
(reanimated/apply-animations-to-style
{:width width-shared-value
:height height-shared-value
:opacity opacity-shared-value}
slider-fixed-styles))
(def dashed-line
{:width 1
:height "100%"
:margin-left -1
:margin-top -1.5})
(defn dashed-line-line
[network-name]
{:background-color (colors/resolve-color network-name nil)
:height 3
:width 1})
(def dashed-line-space {:height 4 :width 1})
@@ -0,0 +1,189 @@
(ns quo.components.wallet.network-routing.view
(:require
[oops.core :as oops]
[quo.components.wallet.network-routing.animation :as animation]
[quo.components.wallet.network-routing.style :as style]
[quo.theme :as quo.theme]
[react-native.core :as rn]
[react-native.gesture :as gesture]
[react-native.reanimated :as reanimated]
[reagent.core :as reagent]
[utils.number]))
(def ^:private timeouts (atom {}))
(defn- add-new-timeout
[k f ms]
(letfn [(exec-fn-and-remove-timeout []
(f)
(swap! timeouts dissoc k))]
(js/clearTimeout (k @timeouts))
(swap! timeouts assoc k (js/setTimeout exec-fn-and-remove-timeout ms))))
(defn- f-slider
[slider-shared-values]
[rn/view {:style style/slider-container}
[reanimated/view {:style (style/slider slider-shared-values)}]])
(defn f-network-bar
[_]
(let [detecting-gesture? (reagent/atom false)
amount-on-gesture-start (atom 0)]
(fn [{:keys [total-width total-amount on-press on-new-amount allow-press?]
{:keys [amount-shared-value
max-amount]} :bar
:as props}]
(let [slider-width-shared-value (reanimated/use-shared-value 4)
slider-height-shared-value (reanimated/use-shared-value 32)
slider-opacity-shared-value (reanimated/use-shared-value 0)
network-bar-shared-value (reanimated/interpolate amount-shared-value
[0 total-amount]
[0 total-width])
width->amount #(/ (* % total-amount) total-width)]
[rn/touchable-without-feedback
{:on-press (fn []
(when (and (not @detecting-gesture?) allow-press?)
(on-press)
(reset! detecting-gesture? true)
(animation/show-slider slider-opacity-shared-value)))}
[reanimated/view
{:style (style/network-bar props network-bar-shared-value)
:accessibility-label :network-routing-bar}
[gesture/gesture-detector
{:gesture
(-> (gesture/gesture-pan)
(gesture/enabled @detecting-gesture?)
(gesture/on-begin
(fn [_]
(animation/increase-slider slider-width-shared-value slider-height-shared-value)
(reset! amount-on-gesture-start (reanimated/get-shared-value amount-shared-value))))
(gesture/on-update
(fn [event]
(let [new-amount (-> (oops/oget event "translationX")
(width->amount)
(+ @amount-on-gesture-start)
(utils.number/value-in-range 1 max-amount))]
(reanimated/set-shared-value amount-shared-value new-amount))))
(gesture/on-finalize
(fn [_]
(animation/decrease-slider slider-width-shared-value slider-height-shared-value)
(animation/hide-slider slider-opacity-shared-value)
(on-new-amount (reanimated/get-shared-value amount-shared-value))
(add-new-timeout :turn-off-gesture #(reset! detecting-gesture? false) 20))))}
[:f> f-slider
{:width-shared-value slider-width-shared-value
:height-shared-value slider-height-shared-value
:opacity-shared-value slider-opacity-shared-value}]]]]))))
(defn- add-bar-shared-values
[{:keys [amount] :as network}]
(assoc network
:amount-shared-value (reanimated/use-shared-value amount)
:translate-x-shared-value (reanimated/use-shared-value 0)))
(def ^:private get-negative-amount
(comp - reanimated/get-shared-value :amount-shared-value))
(defn- dashed-line
[network-name]
[rn/view {:style style/dashed-line}
(take 19
(interleave (repeat [rn/view {:style (style/dashed-line-line network-name)}])
(repeat [rn/view {:style style/dashed-line-space}])))])
(defn f-network-routing-bars
[_]
(let [selected-network-idx (reagent/atom nil)
press-locked? (reagent/atom false)
lock-press #(reset! press-locked? true)
unlock-press #(reset! press-locked? false)
reset-state-values #(reset! selected-network-idx nil)]
(fn [{:keys [networks total-width total-amount requesting-data? on-amount-selected]}]
(let [bar-opacity-shared-value (reanimated/use-shared-value 0)
network-bars (map add-bar-shared-values networks)
amount->width #(* % (/ total-width total-amount))
bars-widths-negative (map #(-> % get-negative-amount amount->width)
network-bars)
last-bar-idx (dec (count network-bars))]
(rn/use-effect
#(when (and (not requesting-data?) @selected-network-idx)
(let [bar (nth network-bars @selected-network-idx)]
(animation/hide-pressed-bar bar amount->width))
(animation/update-bar-values-and-reset-animations
{:new-network-values networks
:network-bars network-bars
:amount->width amount->width
:reset-values-fn reset-state-values
:lock-press-fn lock-press
:unlock-press-fn unlock-press
:add-new-timeout add-new-timeout}))
[requesting-data?])
[:<>
(doall
(for [[bar-idx bar] (map-indexed vector network-bars)
:let [bar-max-width (amount->width (:max-amount bar))
bar-width (-> (:amount-shared-value bar)
(reanimated/get-shared-value)
(amount->width))
hide-division? (or (= last-bar-idx bar-idx) @selected-network-idx)
this-bar-selected? (= @selected-network-idx bar-idx)]]
^{:key (str "network-bar-" bar-idx)}
[:f> f-network-bar
{:bar bar
:max-width bar-max-width
:total-width total-width
:total-amount total-amount
:bar-division? hide-division?
:on-top? this-bar-selected?
:allow-press? (and (or (not @selected-network-idx) this-bar-selected?)
(not requesting-data?)
(not @press-locked?))
:on-press (fn []
(when-not @selected-network-idx
(let [[previous-bars [_ & next-bars]] (split-at bar-idx network-bars)
number-previous-bars bar-idx]
(animation/move-previous-bars
{:bars previous-bars
:bars-widths-negative bars-widths-negative})
(animation/move-pressed-bar
{:bar bar
:bars-widths-negative bars-widths-negative
:number-previous-bars number-previous-bars})
(animation/move-next-bars
{:bars next-bars
:bars-widths-negative bars-widths-negative
:number-previous-bars (inc number-previous-bars)
:extra-offset (max 0 (- bar-max-width bar-width))
:add-new-timeout add-new-timeout}))
(animation/show-max-limit-bar bar-opacity-shared-value)
(reset! selected-network-idx bar-idx)))
:on-new-amount (fn [new-amount]
(animation/hide-max-limit-bar bar-opacity-shared-value)
(when on-amount-selected
(on-amount-selected new-amount @selected-network-idx)))}]))
(let [{:keys [max-amount network-name]} (some->> @selected-network-idx
(nth network-bars))
limit-bar-width (amount->width max-amount)]
[reanimated/view
{:style (style/max-limit-bar
{:opacity-shared-value bar-opacity-shared-value
:width limit-bar-width})}
[rn/view {:style (style/max-limit-bar-background network-name)}]
[dashed-line network-name]])]))))
(defn view-internal
[{:keys [networks container-style theme] :as params}]
(reagent/with-let [total-width (reagent/atom nil)]
[rn/view
{:accessibility-label :network-routing
:style (style/container container-style theme)
:on-layout #(reset! total-width (oops/oget % "nativeEvent.layout.width"))}
(when @total-width
^{:key (str "network-routing-" (count networks))}
[:f> f-network-routing-bars (assoc params :total-width @total-width)])]
(finally
(doseq [[_ living-timeout] @timeouts]
(js/clearTimeout living-timeout)))))
(def view (quo.theme/with-theme view-internal))
+10 -3
View File
@@ -48,6 +48,7 @@
quo.components.drawers.permission-context.view
quo.components.dropdowns.dropdown.view
quo.components.dropdowns.network-dropdown.view
quo.components.dropdowns.dropdown-input.view
quo.components.empty-state.empty-state.view
quo.components.gradient.gradient-cover.view
[quo.components.graph.interactive-graph.view :as interactive-graph]
@@ -77,6 +78,7 @@
quo.components.list-items.preview-list.view
quo.components.list-items.saved-address.view
quo.components.list-items.saved-contact-address.view
quo.components.list-items.token-network.view
quo.components.list-items.token-value.view
quo.components.list-items.user-list
quo.components.loaders.skeleton-list.view
@@ -112,7 +114,6 @@
quo.components.selectors.selectors.view
quo.components.settings.accounts.view
quo.components.settings.category.view
quo.components.settings.category.view
quo.components.settings.data-item.view
quo.components.settings.privacy-option.view
quo.components.settings.reorder-item.view
@@ -132,15 +133,17 @@
quo.components.tags.tag
quo.components.tags.tags
quo.components.tags.tiny-tag.view
quo.components.tags.token-tag
quo.components.tags.token-tag.view
quo.components.text-combinations.view
quo.components.wallet.account-card.view
quo.components.wallet.account-origin.view
quo.components.wallet.account-overview.view
quo.components.wallet.address-text.view
quo.components.wallet.keypair.view
quo.components.wallet.network-amount.view
quo.components.wallet.network-bridge.view
quo.components.wallet.network-link.view
quo.components.wallet.network-routing.view
quo.components.wallet.progress-bar.view
quo.components.wallet.summary-info.view
quo.components.wallet.token-input.view
@@ -227,6 +230,7 @@
;;;; Dropdowns
(def dropdown quo.components.dropdowns.dropdown.view/view)
(def network-dropdown quo.components.dropdowns.network-dropdown.view/view)
(def dropdown-input quo.components.dropdowns.dropdown-input.view/view)
;;;; Empty State
(def empty-state quo.components.empty-state.empty-state.view/empty-state)
@@ -278,6 +282,7 @@
(def community-list-item quo.components.list-items.community.view/view)
(def saved-address quo.components.list-items.saved-address.view/view)
(def saved-contact-address quo.components.list-items.saved-contact-address.view/view)
(def token-network quo.components.list-items.token-network.view/view)
(def token-value quo.components.list-items.token-value.view/view)
;;;; Loaders
@@ -360,7 +365,7 @@
(def tag quo.components.tags.tag/tag)
(def tags quo.components.tags.tags/tags)
(def tiny-tag quo.components.tags.tiny-tag.view/view)
(def token-tag quo.components.tags.token-tag/tag)
(def token-tag quo.components.tags.token-tag.view/view)
;;;; Text combinations
(def text-combinations quo.components.text-combinations.view/view)
@@ -369,9 +374,11 @@
(def account-card quo.components.wallet.account-card.view/view)
(def account-origin quo.components.wallet.account-origin.view/view)
(def account-overview quo.components.wallet.account-overview.view/view)
(def address-text quo.components.wallet.address-text.view/view)
(def keypair quo.components.wallet.keypair.view/view)
(def network-amount quo.components.wallet.network-amount.view/view)
(def network-bridge quo.components.wallet.network-bridge.view/view)
(def network-routing quo.components.wallet.network-routing.view/view)
(def progress-bar quo.components.wallet.progress-bar.view/view)
(def summary-info quo.components.wallet.summary-info.view/view)
(def network-link quo.components.wallet.network-link.view/view)
+3 -1
View File
@@ -32,7 +32,6 @@
[quo.components.inputs.address-input.component-spec]
[quo.components.inputs.input.component-spec]
[quo.components.inputs.locked-input.component-spec]
[quo.components.inputs.locked-input.component-spec]
[quo.components.inputs.profile-input.component-spec]
[quo.components.inputs.recovery-phrase.component-spec]
[quo.components.inputs.title-input.component-spec]
@@ -46,6 +45,7 @@
[quo.components.list-items.dapp.component-spec]
[quo.components.list-items.saved-address.component-spec]
[quo.components.list-items.saved-contact-address.component-spec]
[quo.components.list-items.token-network.component-spec]
[quo.components.list-items.token-value.component-spec]
[quo.components.loaders.skeleton-list.component-spec]
[quo.components.markdown.list.component-spec]
@@ -72,12 +72,14 @@
[quo.components.switchers.group-messaging-card.component-spec]
[quo.components.tags.network-tags.component-spec]
[quo.components.tags.status-tags-component-spec]
[quo.components.tags.tiny-tag.component-spec]
[quo.components.wallet.account-card.component-spec]
[quo.components.wallet.account-origin.component-spec]
[quo.components.wallet.account-overview.component-spec]
[quo.components.wallet.keypair.component-spec]
[quo.components.wallet.network-amount.component-spec]
[quo.components.wallet.network-bridge.component-spec]
[quo.components.wallet.network-routing.component-spec]
[quo.components.wallet.progress-bar.component-spec]
[quo.components.wallet.summary-info.component-spec]
[quo.components.wallet.token-input.component-spec]
+1 -1
View File
@@ -37,7 +37,7 @@
[k]
(get tokens k))
(def networks
(def ^:private networks
{:arbitrum (js/require "../resources/images/networks/Arbitrum.png")
:ethereum (js/require "../resources/images/networks/Ethereum.png")
:gnosis (js/require "../resources/images/networks/Gnosis.png")
+7 -1
View File
@@ -1,6 +1,6 @@
(ns react-native.cameraroll
(:require
["@react-native-community/cameraroll" :as CameraRoll]
["@react-native-camera-roll/camera-roll" :refer [CameraRoll]]
[react-native.fs :as fs]
[taoensso.timbre :as log]
[utils.transforms :as transforms]))
@@ -22,3 +22,9 @@
(-> (.save CameraRoll (clj->js path))
(.then #(fs/unlink path))
(.catch #(fs/unlink path))))
(defn get-photos-count-ios
[cb]
(-> (.getPhotosCountiOS CameraRoll)
(.then #(cb %))
(.catch #(js/console.error %))))
-3
View File
@@ -20,9 +20,6 @@
(map? view)
(merge view)
(= view :mobile-network)
(merge mobile-network-settings/settings-sheet)
(= view :mobile-network-offline)
(merge mobile-network-settings/offline-sheet)
+1 -1
View File
@@ -24,7 +24,7 @@
(defn universal-link
[community-id]
(str (:external universal-links/domains)
"/c/"
"/c#"
community-id))
(defn <-request-to-join-community-rpc
@@ -29,15 +29,6 @@
cofx
{:db (assoc db :network-status/initialized? true)}
(cond
(and logged-in?
(utils/cellular? (:network/type db))
(not remember-syncing-choice?)
(not= :create-multiaccount (:view-id db)))
[(bottom-sheet/show-bottom-sheet-old
{:view :mobile-network})
(sheet-defaults)]
;; NOTE(rasom): When we log into account on-network-status-change is
;; dispatched, but that doesn't mean there was a status change, thus
;; no reason to restart wallet.
+51 -23
View File
@@ -30,6 +30,10 @@
(def handled-schemes (set (into uri-schemes web-urls)))
(def group-chat-extractor
{[#"(.*)" :params] {"" :group-chat
"/" :group-chat}})
(def eip-extractor
{#{[:prefix "-" :address]
[:address]}
@@ -39,9 +43,15 @@
(def routes
[""
{handled-schemes {["c/" :community-data] :community
["cc/" :chat-data] :community-chat
["u/" :user-data] :user}
{handled-schemes {["c/" :community-data] :community
["cc/" :community-data] :community-chat
["p/" :chat-id] :private-chat
["cr/" :community-id] :community-requests
"g/" group-chat-extractor
["wallet/" :account] :wallet-account
["u/" :user-data] :user
"c" :community
"u" :user}
ethereum-scheme eip-extractor}])
(defn parse-query-params
@@ -58,7 +68,6 @@
(defn match-uri
[uri]
;;
(let [;; bidi has trouble parse path with `=` in it extract `=` here and add back to parsed
;; base64url regex based on https://datatracker.ietf.org/doc/html/rfc4648#section-5 may
;; include invalid base64 (invalid length, length of any base64 encoded string must be a
@@ -70,6 +79,7 @@
uri-without-equal-in-path
(if equal-end-of-base64url (string/replace-first uri equal-end-of-base64url "") uri)
;; fragment is the one after `#`, usually user-id, ens-name, community-id
fragment (parse-fragment uri)
ens? (ens/is-valid-eth-name? fragment)
@@ -87,8 +97,18 @@
(and equal-end-of-base64url (= handler :community) (:community-data route-params))
(update-in [:route-params :community-data] #(str % equal-end-of-base64url))
(and equal-end-of-base64url (= handler :community-chat) (:chat-data route-params))
(update-in [:route-params :chat-data] #(str % equal-end-of-base64url))
(and equal-end-of-base64url (= handler :community-chat) (:community-data route-params))
(update-in [:route-params :community-data] #(str % equal-end-of-base64url))
(and fragment (= handler :community-chat) (:community-data route-params))
(assoc-in [:route-params :community-id] fragment)
(and fragment
(= handler :community-chat)
(:community-data route-params)
(string? (:community-data route-params))
(re-find constants/regx-starts-with-uuid (:community-data route-params)))
(assoc-in [:route-params :community-channel-id] (:community-data route-params))
(and equal-end-of-base64url (= handler :user) (:user-data route-params))
(update-in [:route-params :user-data] #(str % equal-end-of-base64url))
@@ -174,6 +194,15 @@
(cb {:type :private-chat
:error :invalid-chat-id})))))
(defn match-community-channel-async
[{:keys [community-channel-id community-id]} cb]
(if (validators/valid-compressed-key? community-id)
(native-module/deserialize-and-compress-key
community-id
#(cb {:type :community-chat :chat-id (str % community-channel-id)}))
(cb {:type :community-chat
:error :not-found})))
(defn match-browser
[uri {:keys [domain]}]
;; NOTE: We rebuild domain from original URI and matched domain
@@ -238,8 +267,8 @@
:community))
(defn handle-uri
[chain _chats uri cb]
(let [{:keys [handler route-params]} (match-uri uri)]
[chain chats uri cb]
(let [{:keys [handler route-params query-params]} (match-uri uri)]
(log/info "[router] uri " uri " matched " handler " with " route-params)
(cond
@@ -253,36 +282,35 @@
(and (= handler :user) (:user-id route-params))
(match-contact-async chain route-params cb)
;; ;; NOTE: removed in `match-uri`, might need this in the future
;; (= handler :private-chat)
;; (match-private-chat-async chain route-params cb)
;; NOTE: removed in `match-uri`, might need this in the future
(= handler :private-chat)
(match-private-chat-async chain route-params cb)
;; ;; NOTE: removed in `match-uri`, might need this in the future
;; (= handler :group-chat)
;; (cb (match-group-chat chats query-params))
;; NOTE: removed in `match-uri`, might need this in the future
(= handler :group-chat)
(cb (match-group-chat chats query-params))
(validators/valid-public-key? uri)
(match-contact-async chain {:user-id uri} cb)
;; ;; NOTE: removed in `match-uri`, might need this in the future
;; (= handler :community-requests)
;; (cb {:type handler :community-id (:community-id route-params)})
;; NOTE: removed in `match-uri`, might need this in the future
(= handler :community-requests)
(cb {:type handler :community-id (:community-id route-params)})
(and (= handler :community) (:community-id route-params))
(cb {:type (community-route-type route-params)
:community-id (:community-id route-params)})
;; ;; TODO: jump to community overview for now, should jump to community channel
;; (and (= handler :community-chat) (:chat-id route-params))
;; (cb {:type handler :chat-id (:chat-id route-params)})
(and (= handler :community-chat) (:community-channel-id route-params) (:community-id route-params))
(match-community-channel-async route-params cb)
(and (= handler :community-chat) (:community-id route-params))
(cb {:type (community-route-type route-params)
:community-id (:community-id route-params)})
;; ;; NOTE: removed in `match-uri`, might need this in the future
;; (= handler :wallet-account)
;; (cb (match-wallet-account route-params))
;; NOTE: removed in `match-uri`, might need this in the future
(= handler :wallet-account)
(cb (match-wallet-account route-params))
(address/address? uri)
(cb (address->eip681 uri))
+32 -2
View File
@@ -19,6 +19,9 @@
:query-params (when (= 3 (count expected)) (last expected))
:uri uri})
"https://status.app/u#zQ3shwQPhRuDJSjVGVBnTjCdgXy5i9WQaeVPdGJD6yTarJQSj"
[:user
{:user-id "zQ3shwQPhRuDJSjVGVBnTjCdgXy5i9WQaeVPdGJD6yTarJQSj"}]
"https://status.app/u/G10A4B0JdgwyRww90WXtnP1oNH1ZLQNM0yX0Ja9YyAMjrqSZIYINOHCbFhrnKRAcPGStPxCMJDSZlGCKzmZrJcimHY8BbcXlORrElv_BbQEegnMDPx1g9C5VVNl0fE4y#zQ3shwQPhRuDJSjVGVBnTjCdgXy5i9WQaeVPdGJD6yTarJQSj"
[:user
{:user-data
@@ -31,23 +34,46 @@
"G10A4B0JdgwyRww90WXtnP1oNH1ZLQNM0yX0Ja9YyAMjrqSZIYINOHCbFhrnKRAcPGStPxCMJDSZlGCKzmZrJcimHY8BbcXlORrElv_BbQEegnMDPx1g9C5VVNl0fE4y"
:user-id "zQ3shwQPhRuDJSjVGVBnTjCdgXy5i9WQaeVPdGJD6yTarJQSj"}]
"status-app://u#zQ3shwQPhRuDJSjVGVBnTjCdgXy5i9WQaeVPdGJD6yTarJQSj"
[:user
{:user-id "zQ3shwQPhRuDJSjVGVBnTjCdgXy5i9WQaeVPdGJD6yTarJQSj"}]
"https://status.app/cc/G54AAKwObLdpiGjXnckYzRcOSq0QQAS_CURGfqVU42ceGHCObstUIknTTZDOKF3E8y2MSicncpO7fTskXnoACiPKeejvjtLTGWNxUhlT7fyQS7Jrr33UVHluxv_PLjV2ePGw5GQ33innzeK34pInIgUGs5RjdQifMVmURalxxQKwiuoY5zwIjixWWRHqjHM=#zQ3shYSHp7GoiXaauJMnDcjwU2yNjdzpXLosAWapPS4CFxc11"
[:community-chat
{:chat-data
{:community-data
"G54AAKwObLdpiGjXnckYzRcOSq0QQAS_CURGfqVU42ceGHCObstUIknTTZDOKF3E8y2MSicncpO7fTskXnoACiPKeejvjtLTGWNxUhlT7fyQS7Jrr33UVHluxv_PLjV2ePGw5GQ33innzeK34pInIgUGs5RjdQifMVmURalxxQKwiuoY5zwIjixWWRHqjHM="
:community-id "zQ3shYSHp7GoiXaauJMnDcjwU2yNjdzpXLosAWapPS4CFxc11"}]
"status-app://cc/G54AAKwObLdpiGjXnckYzRcOSq0QQAS_CURGfqVU42ceGHCObstUIknTTZDOKF3E8y2MSicncpO7fTskXnoACiPKeejvjtLTGWNxUhlT7fyQS7Jrr33UVHluxv_PLjV2ePGw5GQ33innzeK34pInIgUGs5RjdQifMVmURalxxQKwiuoY5zwIjixWWRHqjHM=#zQ3shYSHp7GoiXaauJMnDcjwU2yNjdzpXLosAWapPS4CFxc11"
[:community-chat
{:chat-data
{:community-data
"G54AAKwObLdpiGjXnckYzRcOSq0QQAS_CURGfqVU42ceGHCObstUIknTTZDOKF3E8y2MSicncpO7fTskXnoACiPKeejvjtLTGWNxUhlT7fyQS7Jrr33UVHluxv_PLjV2ePGw5GQ33innzeK34pInIgUGs5RjdQifMVmURalxxQKwiuoY5zwIjixWWRHqjHM="
:community-id "zQ3shYSHp7GoiXaauJMnDcjwU2yNjdzpXLosAWapPS4CFxc11"}]
"https://status.app/cc/c432709e-fc73-440d-bb67-cb3a0929dfda#zQ3shZL6dXiFCbDyxnXxwQa9v8QFC2q19subFtyxd7kVszMVo"
[:community-chat
{:community-data
"c432709e-fc73-440d-bb67-cb3a0929dfda"
:community-channel-id
"c432709e-fc73-440d-bb67-cb3a0929dfda"
:community-id "zQ3shZL6dXiFCbDyxnXxwQa9v8QFC2q19subFtyxd7kVszMVo"}]
"status-app://cc/c432709e-fc73-440d-bb67-cb3a0929dfda#zQ3shZL6dXiFCbDyxnXxwQa9v8QFC2q19subFtyxd7kVszMVo"
[:community-chat
{:community-data
"c432709e-fc73-440d-bb67-cb3a0929dfda"
:community-channel-id
"c432709e-fc73-440d-bb67-cb3a0929dfda"
:community-id "zQ3shZL6dXiFCbDyxnXxwQa9v8QFC2q19subFtyxd7kVszMVo"}]
"https://status.app/c/iyKACkQKB0Rvb2RsZXMSJ0NvbG9yaW5nIHRoZSB3b3JsZCB3aXRoIGpveSDigKIg4bSXIOKAohiYohsiByMxMzFEMkYqAwEhMwM=#zQ3shYSHp7GoiXaauJMnDcjwU2yNjdzpXLosAWapPS4CFxc11"
[:community
{:community-data
"iyKACkQKB0Rvb2RsZXMSJ0NvbG9yaW5nIHRoZSB3b3JsZCB3aXRoIGpveSDigKIg4bSXIOKAohiYohsiByMxMzFEMkYqAwEhMwM="
:community-id "zQ3shYSHp7GoiXaauJMnDcjwU2yNjdzpXLosAWapPS4CFxc11"}]
"https://status.app/c#zQ3shYSHp7GoiXaauJMnDcjwU2yNjdzpXLosAWapPS4CFxc11"
[:community
{:community-id "zQ3shYSHp7GoiXaauJMnDcjwU2yNjdzpXLosAWapPS4CFxc11"}]
"status-app://c/iyKACkQKB0Rvb2RsZXMSJ0NvbG9yaW5nIHRoZSB3b3JsZCB3aXRoIGpveSDigKIg4bSXIOKAohiYohsiByMxMzFEMkYqAwEhMwM=#zQ3shYSHp7GoiXaauJMnDcjwU2yNjdzpXLosAWapPS4CFxc11"
[:community
@@ -55,6 +81,10 @@
"iyKACkQKB0Rvb2RsZXMSJ0NvbG9yaW5nIHRoZSB3b3JsZCB3aXRoIGpveSDigKIg4bSXIOKAohiYohsiByMxMzFEMkYqAwEhMwM="
:community-id "zQ3shYSHp7GoiXaauJMnDcjwU2yNjdzpXLosAWapPS4CFxc11"}]
"status-app://c#zQ3shYSHp7GoiXaauJMnDcjwU2yNjdzpXLosAWapPS4CFxc11"
[:community
{:community-id "zQ3shYSHp7GoiXaauJMnDcjwU2yNjdzpXLosAWapPS4CFxc11"}]
"ethereum:0x89205a3a3b2a69de6dbf7f01ed13b2108b2c43e7"
[:ethereum {:address "0x89205a3a3b2a69de6dbf7f01ed13b2108b2c43e7"}]
+6 -7
View File
@@ -67,18 +67,17 @@
:else theme)
{:keys [icon-color background-color text-color border-color]}
(themes theme')]
(println "theme" theme' background-color)
[rn/touchable-without-feedback
(merge (when on-press
(merge {:disabled disabled
:accessibility-label accessibility-label}
(when on-press
{:on-press on-press})
(when on-long-press
{:on-long-press on-long-press}))
[rn/view
(merge {:background-color background-color
:border-radius border-radius
:type type
:disabled disabled
:accessibility-label accessibility-label}
(merge {:background-color background-color
:border-radius border-radius}
(when border-color
{:border-color border-color
:border-width 1}))
+1 -2
View File
@@ -1,7 +1,6 @@
(ns status-im.ui.components.text
(:require
[react-native.core :as rn]
[react-native.reanimated :as animated]
[reagent.core :as reagent]
[status-im.ui.components.colors :as colors]
[status-im.ui.components.typography :as typography]))
@@ -44,7 +43,7 @@
[]
(let [this (reagent/current-component)
props (reagent/props this)
component (if (:animated? props) animated/text rn/text)]
component rn/text]
(into [component
(merge {:style (text-style props)}
(dissoc props
@@ -1,12 +1,10 @@
(ns status-im.ui.screens.mobile-network-settings.sheets
(:require-macros [status-im.utils.views :as views])
(:require
[re-frame.core :as re-frame]
[status-im.ui.components.checkbox.view :as checkbox]
[status-im.ui.components.list.item :as list.item]
[status-im.ui.components.react :as react]
[status-im.ui.screens.mobile-network-settings.sheets-styles :as styles]
[utils.i18n :as i18n]))
(:require [re-frame.core :as re-frame]
[status-im.ui.components.list.item :as list.item]
[status-im.ui.components.react :as react]
[status-im.ui.screens.mobile-network-settings.sheets-styles :as styles]
[utils.i18n :as i18n]))
(defn title
[label]
@@ -36,65 +34,6 @@
:on-press #(re-frame/dispatch [:mobile-network/navigate-to-settings])}
(i18n/label :t/mobile-network-go-to-settings)]])
(views/defview checkbox
[]
(views/letsubs [checked? [:mobile-network/remember-choice?]]
[react/view
{:style styles/checkbox-line-container
:accessibility-label "remember-choice"}
[checkbox/checkbox
{:checked? checked?
:style styles/checkbox
:icon-style styles/checkbox-icon
:on-value-change #(re-frame/dispatch [:mobile-network/remember-choice? %])}]
[react/view
{:style styles/checkbox-text-container}
[react/text (i18n/label :t/mobile-network-sheet-remember-choice)]]]))
(defn settings
[]
[react/view
{:style styles/settings-container}
[react/nested-text
{:style styles/settings-text
:on-press #(re-frame/dispatch [:mobile-network/navigate-to-settings])}
(i18n/label :t/mobile-network-sheet-configure)
[{:style styles/settings-link}
(str " " (i18n/label :t/mobile-network-sheet-settings))]]])
(defn hide-sheet-and-dispatch
[event]
(re-frame/dispatch [:bottom-sheet/hide-old])
(re-frame/dispatch event))
(views/defview settings-sheet
[]
[react/view {:flex 1}
[react/view {:align-items :center}
[title :mobile-syncing-sheet-title]
[details :mobile-syncing-sheet-details]]
[list.item/list-item
{:theme :accent
:accessibility-label "mobile-network-continue-syncing"
:title (i18n/label :t/mobile-network-continue-syncing)
:subtitle (i18n/label :t/mobile-network-continue-syncing-details)
:subtitle-max-lines 2
:icon :main-icons/network
:on-press #(hide-sheet-and-dispatch [:mobile-network/continue-syncing])}]
[list.item/list-item
{:theme :negative
:accessibility-label "mobile-network-stop-syncing"
:title (i18n/label :t/mobile-network-stop-syncing)
:subtitle (i18n/label :t/mobile-network-stop-syncing-details)
:icon :main-icons/cancel
:on-press #(hide-sheet-and-dispatch [:mobile-network/stop-syncing])}]
[separator]
[react/view
{:flex 1
:align-self :stretch}
[checkbox]
[settings]]])
(views/defview offline-sheet
[]
[react/view {:flex 1}
@@ -53,8 +53,5 @@
:on-press #(hide-sheet-and-dispatch [:mobile-network/restore-defaults])}
(i18n/label :t/restore-defaults)]]]))
(def settings-sheet
{:content sheets/settings-sheet})
(def offline-sheet
{:content sheets/offline-sheet})
+23 -8
View File
@@ -1,16 +1,18 @@
(ns status-im.ui.screens.qr-scanner.views
(:require-macros [status-im.utils.views :refer [defview letsubs]])
(:require
[clojure.string :as string]
[re-frame.core :as re-frame]
[react-native.camera-kit :as camera-kit]
[react-native.core :as rn]
[reagent.core :as reagent]
[status-im.ui.components.colors :as colors]
[status-im.ui.components.core :as quo]
[status-im.ui.components.react :as react]
[status-im.ui.components.topbar :as topbar]
[status-im.ui.screens.qr-scanner.styles :as styles]
[status-im2.config :as config]
[utils.i18n :as i18n]))
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
(defn get-qr-code-data
[^js event]
@@ -85,13 +87,18 @@
[opts data]
(re-frame/dispatch [:qr-scanner.callback/scan-qr-code-success opts (get-qr-code-data data)]))
(defview qr-scanner
(defn- navigate-back-handler
[]
(letsubs [read-once? (atom false)
{:keys [height width]} [:dimensions/window]
camera-flashlight [:wallet-legacy.send/camera-flashlight]
opts [:get-screen-params]
camera-ref (atom nil)]
(re-frame/dispatch [:navigate-back])
true)
(defn f-qr-scanner
[]
(let [read-once? (reagent/atom false)
{:keys [height width]} (rf/sub [:dimensions/window])
camera-flashlight (rf/sub [:wallet-legacy.send/camera-flashlight])
opts (rf/sub [:get-screen-params])
camera-ref (reagent/atom nil)]
[react/view
{:flex 1
:background-color colors/black-persist}
@@ -111,3 +118,11 @@
(reset! read-once? true)
(on-barcode-read opts %))}]]
[viewfinder (int (* 2 (/ (min height width) 3)))]])]))
(defn qr-scanner
[]
(reagent/create-class
{:display-name "qr-scanner"
:component-did-mount #(rn/hw-back-add-listener navigate-back-handler)
:component-will-unmount #(rn/hw-back-remove-listener navigate-back-handler)
:reagent-render f-qr-scanner}))
+1 -1
View File
@@ -152,7 +152,7 @@
:component wallet.account/account}
{:name :add-new-account
;;TODO dynamic title
:options {:insets {:top? true}}
:options {:insets {:top? true :bottom? true}}
:component add-account/add-account-view}
{:name :add-new-account-pin
;;TODO dynamic title
@@ -211,7 +211,7 @@
{:style styles/round-action-button
:on-press on-press}
(icons/icon icon {:color colors/white})]
[quo/text
[components.core/text
{:color :secondary
:size :small
:style {:margin-top (:tiny spacing/spacing)}}
@@ -348,7 +348,7 @@
:margin-top 8
:margin-horizontal 67.5
:text-align :center}}
[quo/text
[components.core/text
{:color :secondary
:size :small
:style {:text-align :center}}
@@ -145,7 +145,7 @@
:justify-content :center
:left 0
:right 0
:bottom 16
:bottom 56
:height 40})
(defn send-button
@@ -244,10 +244,11 @@
to to-wallet to-contact
gas-limit gas-price-gwei gas-price-eth gas-used
fee-cap-gwei tip-cap-gwei
cost nonce data]}]
cost nonce data]
:as tx}]
[react/view {:style styles/details-block}
[details-list-row :t/block block]
[details-list-row :t/hash hash]
[details-list-row :t/hash (:hash tx)]
[details-list-row :t/from-capitalized
[{:accessibility-label (if from-wallet :sender-name-text :sender-address-text)}
(or from-wallet from-contact from)]
+2 -21
View File
@@ -1,7 +1,6 @@
(ns status-im.utils.universal-links.core
(:require
[clojure.string :as string]
[goog.string :as gstring]
[native-module.core :as native-module]
[re-frame.core :as re-frame]
[status-im.group-chats.core :as group-chats]
@@ -9,7 +8,6 @@
[status-im.router.core :as router]
[status-im.ui.components.react :as react]
[status-im.wallet.choose-recipient.core :as choose-recipient]
[status-im2.constants :as constants]
[status-im2.navigation.events :as navigation]
[taoensso.timbre :as log]
[utils.ethereum.chain :as chain]
@@ -27,27 +25,11 @@
(def links
{:private-chat "%s/p/%s"
:community-requests "%s/cr/%s"
:community "%s/c/%s"
:community "%s/c#%s"
:group-chat "%s/g/%s"
:user "%s/u/%s"
:user "%s/u#%s"
:browse "%s/b/%s"})
(defn generate-link
[link-type domain-type param]
(gstring/format (get links link-type)
(get domains domain-type)
param))
(defn universal-link?
[url]
(boolean
(re-matches constants/regx-universal-link url)))
(defn deep-link?
[url]
(boolean
(re-matches constants/regx-deep-link url)))
(rf/defn handle-browse
[cofx {:keys [url]}]
(log/info "universal-links: handling browse" url)
@@ -220,7 +202,6 @@
#_(native-module/start-searching-for-local-pairing-peers
#(log/info "[local-pairing] errors from local-pairing-preflight-outbound-check ->" %)))
(defn finalize
"Remove event listener for url"
[]
@@ -20,9 +20,9 @@
(is (nil? (get-in (links/handle-url {:db db} "some-url")
[:db :universal-links/url]))))
(testing "Handle a custom string"
(is (= (get-in (links/handle-url {:db db} "https://status.app/u/statuse2e")
(is (= (get-in (links/handle-url {:db db} "https://status.app/u#statuse2e")
[::router/handle-uri :uri])
"https://status.app/u/statuse2e")))))))
"https://status.app/u#statuse2e")))))))
(deftest url-event-listener
(testing "the url is not nil"
@@ -10,7 +10,7 @@
(def links
{:private-chat "%s/p/%s"
:user "%s/u/%s"
:user "%s/u#%s"
:browse "%s/b/%s"})
(defn universal-link?
@@ -0,0 +1,25 @@
(ns status-im2.common.data-store.wallet
(:require
clojure.set))
(defn <-rpc
[network]
(-> network
(clojure.set/rename-keys
{:Prod :prod
:Test :test
:isTest :test?
:tokenOverrides :token-overrides
:rpcUrl :rpc-url
:chainColor :chain-color
:chainName :chain-name
:nativeCurrencyDecimals :native-currency-decimals
:relatedChainId :related-chain-id
:shortName :short-name
:chainId :chain-id
:originalFallbackURL :original-fallback-url
:originalRpcUrl :original-rpc-url
:fallbackURL :fallback-url
:blockExplorerUrl :block-explorer-url
:nativeCurrencySymbol :native-currency-symbol
:nativeCurrencyName :native-currency-symbol})))
+12 -29
View File
@@ -1,21 +1,12 @@
(ns status-im2.common.home.top-nav.view
(:require
[quo.core :as quo]
[react-native.core :as rn]
[status-im.multiaccounts.core :as multiaccounts]
[status-im2.common.home.top-nav.style :as style]
[status-im2.constants :as constants]
[utils.debounce :refer [dispatch-and-chill]]
[utils.re-frame :as rf]))
(defn connectivity-sheet
[]
(let [peers-count (rf/sub [:peers-count])
network-type (rf/sub [:network/type])]
[rn/view
[quo/text {:accessibility-label :peers-network-type-text} (str "NETWORK TYPE: " network-type)]
[quo/text {:accessibility-label :peers-count-text} (str "PEERS COUNT: " peers-count)]]))
(defn view
"[top-nav props]
props
@@ -30,7 +21,6 @@
avatar {:online? online?
:full-name (multiaccounts/displayed-name account)
:profile-picture (multiaccounts/displayed-photo account)}
network-type (rf/sub [:network/type])
unread-count (rf/sub [:activity-center/unread-count])
indicator (rf/sub [:activity-center/unread-indicator])
notification-type (case indicator
@@ -41,22 +31,15 @@
; https://github.com/status-im/status-mobile/issues/17102
nil)]
[quo/top-nav
{:avatar-on-press #(rf/dispatch [:navigate-to :my-profile])
:scan-on-press #(js/alert "to be implemented")
:activity-center-on-press #(rf/dispatch [:activity-center/open])
:qr-code-on-press #(dispatch-and-chill [:open-modal :share-shell] 1000)
:container-style (merge style/top-nav-container container-style)
:blur? blur?
:jump-to? jump-to?
:customization-color customization-color
:avatar-props avatar
:max-unread-notifications constants/activity-center-max-unread-count
:notification-count unread-count
:notification notification-type
:for-qa-only-cellular-network {:accessibility-label :on-cellular-network
:on-press #(rf/dispatch [:show-bottom-sheet
{:content connectivity-sheet}])}
:for-qa-only-no-network {:accessibility-label :no-network-connection
:on-press #(rf/dispatch [:show-bottom-sheet
{:content connectivity-sheet}])}
:for-qa-only-network-type network-type}]))
{:avatar-on-press #(rf/dispatch [:navigate-to :my-profile])
:scan-on-press #(js/alert "to be implemented")
:activity-center-on-press #(rf/dispatch [:activity-center/open])
:qr-code-on-press #(dispatch-and-chill [:open-modal :share-shell] 1000)
:container-style (merge style/top-nav-container container-style)
:blur? blur?
:jump-to? jump-to?
:customization-color customization-color
:avatar-props avatar
:max-unread-notifications constants/activity-center-max-unread-count
:notification-count unread-count
:notification notification-type}]))
+61
View File
@@ -36,3 +36,64 @@
:qr-size (or 400 (int size))
:error-level :highest})]
[quo/qr-code (assoc props :qr-image-uri qr-media-server-uri)]))
(defn- get-network-short-name-url
[network]
(case network
:ethereum "eth:"
:optimism "opt:"
:arbitrum "arb1:"
(str (name network) ":")))
(defn- get-qr-data-for-wallet-multichain
[qr-data networks]
(as-> networks $
(map get-network-short-name-url $)
(apply str $)
(str $ qr-data)))
(defn share-qr-code
"Receives the following properties:
- type: :profile | :wallet-legacy | :wallet-multichain
- qr-data: Text to encode in the QR code
- qr-data-label-shown: Text to show below the QR code
- on-text-press: Callback for the `qr-data-label-shown` text.
- on-text-long-press: Callback for the `qr-data-label-shown` text.
- on-share-press: Callback for the share button.
- customization-color: Custom color for the QR code component.
- unblur-on-android?: [Android only] disables blur for this component.
Depending on the `type`, different properties are accepted:
`:profile`
- full-name: User full name.
- profile-picture: map ({:source image-source}) or any image source.
`:wallet-legacy`
- emoji: Emoji in a string to show in the QR code.
- on-info-press: Callback for the info icon.
- on-legacy-press: Callback for the legacy tab.
- on-multichain-press: Callback for the multichain tab.
`:wallet-multichain`
- networks: A vector of network names (`[:ethereum, :optimism, :my-net, ,,,]`)
they will add network prefixes to the address in
`qr-data-label-shown` and the QR code generated.
- on-settings-press: Callback for the settings button.
- emoji: Emoji in a string to show in the QR code.
- on-info-press: Callback for the info icon.
- on-legacy-press: Callback for the legacy tab.
- on-multichain-press: Callback for the multichain tab."
[{:keys [qr-data qr-data-label-shown networks]
share-qr-type :type
:as props}]
(let [label (or qr-data-label-shown qr-data)
string-to-encode (if (= share-qr-type :wallet-multichain)
(get-qr-data-for-wallet-multichain qr-data networks)
qr-data)
qr-media-server-uri (image-server/get-qr-image-uri-for-any-url
{:url string-to-encode
:port (rf/sub [:mediaserver/port])
:qr-size 600
:error-level :highest})]
[quo/share-qr-code
(assoc props
:qr-data label
:qr-image-uri qr-media-server-uri)]))
+2 -1
View File
@@ -46,7 +46,8 @@
:no-contacts-to-invite-light (js/require "../resources/images/ui2/no-contacts-to-invite-light.png")
:no-contacts-to-invite-dark (js/require "../resources/images/ui2/no-contacts-to-invite-dark.png")
:no-notifications-light (js/require "../resources/images/ui2/no-notifications-light.png")
:no-notifications-dark (js/require "../resources/images/ui2/no-notifications-dark.png")})
:no-notifications-dark (js/require "../resources/images/ui2/no-notifications-dark.png")
:welcome-illustration (js/require "../resources/images/ui2/welcome_illustration.png")})
(def ui-themed
{:no-messages

Some files were not shown because too many files have changed in this diff Show More