mirror of
https://github.com/status-im/status-desktop.git
synced 2025-03-01 06:51:08 +00:00
Implementing the user-story for sign request expiry and add qml tests + other minor fixes ## Acceptance Criteria ``` //Always show the expiration Given the sign/transaction request dialog is shown When request has an expiration date Then the user sees a 1 minute countdown in the dialog ``` ``` // Show 1 minute timer Given the sign/transaction request dialog is shown When the request has 1 minute or less before expiring Then the user sees a 1 second countdown in the dialog ``` ``` Given the sign/transaction dialog is open When the request expires Then the Accept button is removed And the only option for the user is to close the dialog ``` ``` Given the sign/transaction request dialog is open When the request expired Then the `Sign` and `Reject` buttons are removed And the `Close` button is visible ``` ``` Given the sign/transaction request expired Then a toast message is showing And it contains the "<dapp domain> sign request timed out" message ``` ``` Given the sign/transaction request dialog is open When the request expired Then the sign/transaction request dialog is still visible ``` ``` Given the sign/transaction request expires Then a console message is shown And it contains 'WC WalletConnectSDK.onSessionRequestExpire; id: ${id}`' ```
Wallet Connect Integration
WalletConnect SDK management
To install/updates dependencies follow these steps by running the following commands in this directory:
- Step 1: update the
package.json
versions and runnpm install
- alternatively
- use the command
npm install <package-name>@<version/latest> --save
for individual packages - or to update to the latest run
ncu -u; npm install
in here- run
npm install -g npm-check-updates
forncu
command
- run
- use the command
- these commands will also create or update a
package-lock.json
file and populate thenode_modules
directory
- alternatively
- Step 2: update the
bundle.js
file by runningnpm run build
- the result will be embedded with the app and loaded by
WalletConnectSDK.qml
component
- the result will be embedded with the app and loaded by
- Step 3: add the newly generated files to index
git add --update .
to include in the commit
Testing
Use the web demo test client https://react-app.walletconnect.com/ for wallet pairing and https://react-auth-dapp.walletconnect.com/ for authentication
Log
Initial setup
npm init -y
npm install --save-dev webpack webpack-cli webpack-dev-server
npm install --save @walletconnect/web3wallet
npm run build
# npm run build:dev # for development