Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(wallet) add pending transaction test helpers #4492

Merged
merged 11 commits into from
Jan 8, 2024

Conversation

stefandunca
Copy link
Contributor

@stefandunca stefandunca commented Dec 20, 2023

Stack from ghstack (oldest at bottom):

Refactor the test helpers for pending transactions by extracting the mock implementations and helper functions into a new file transactions/testhelpers.go. Update event names for clarity and consistency in pendingtxtracker.go.

@status-im-auto
Copy link
Member

status-im-auto commented Dec 20, 2023

Jenkins Builds

Click to see older builds (36)
Commit #️⃣ Finished (UTC) Duration Platform Result
✖️ 8820cf7 #1 2023-12-20 02:18:48 ~2 min tests 📄log
✔️ 8820cf7 #1 2023-12-20 02:19:46 ~3 min linux 📦zip
✔️ 8820cf7 #1 2023-12-20 02:21:49 ~5 min android 📦aar
✖️ 9505d38 #2 2023-12-20 02:29:13 ~53 sec tests 📄log
✔️ 9505d38 #2 2023-12-20 02:29:58 ~1 min android 📦aar
✔️ 9505d38 #2 2023-12-20 02:31:30 ~3 min linux 📦zip
✖️ aaebd93 #3 2023-12-27 19:01:48 ~2 min tests 📄log
✔️ aaebd93 #3 2023-12-27 19:02:28 ~3 min linux 📦zip
✔️ aaebd93 #3 2023-12-27 19:04:11 ~5 min ios 📦zip
✔️ aaebd93 #3 2023-12-27 19:04:32 ~5 min android 📦aar
✖️ c26c4fb #4 2023-12-27 19:09:19 ~2 min tests 📄log
✔️ c26c4fb #4 2023-12-27 19:10:05 ~3 min linux 📦zip
✔️ c26c4fb #4 2023-12-27 19:10:30 ~3 min ios 📦zip
✔️ c26c4fb #4 2023-12-27 19:11:08 ~4 min android 📦aar
✖️ 27ecc16 #5 2024-01-04 04:34:50 ~2 min tests 📄log
✔️ 27ecc16 #5 2024-01-04 04:35:46 ~3 min linux 📦zip
✔️ 27ecc16 #5 2024-01-04 04:37:52 ~5 min android 📦aar
✔️ 27ecc16 #5 2024-01-04 04:39:20 ~7 min ios 📦zip
✔️ 7182805 #6 2024-01-05 04:37:39 ~3 min linux 📦zip
✔️ 7182805 #6 2024-01-05 04:38:23 ~3 min ios 📦zip
✔️ 7182805 #6 2024-01-05 04:38:41 ~4 min android 📦aar
✖️ 7182805 #6 2024-01-05 04:54:41 ~20 min tests 📄log
✖️ 7182805 #7 2024-01-05 16:08:48 ~21 min tests 📄log
✖️ 7182805 #8 2024-01-05 17:20:30 ~19 min tests 📄log
✔️ c558c25 #7 2024-01-05 17:53:37 ~1 min android 📦aar
✔️ c558c25 #7 2024-01-05 17:53:54 ~1 min linux 📦zip
✔️ c558c25 #7 2024-01-05 17:55:33 ~3 min ios 📦zip
✖️ c558c25 #9 2024-01-05 18:06:04 ~14 min tests 📄log
✔️ 53727ff #8 2024-01-06 04:10:33 ~1 min linux 📦zip
✔️ 53727ff #8 2024-01-06 04:11:30 ~2 min android 📦aar
✔️ 53727ff #8 2024-01-06 04:18:24 ~9 min ios 📦zip
✖️ 53727ff #10 2024-01-06 04:30:13 ~21 min tests 📄log
✔️ 4f3899d #9 2024-01-06 04:21:46 ~1 min android 📦aar
✔️ 4f3899d #9 2024-01-06 04:23:04 ~3 min linux 📦zip
✔️ 4f3899d #9 2024-01-06 04:23:16 ~3 min ios 📦zip
✔️ 4f3899d #11 2024-01-06 05:08:53 ~38 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✖️ 5ec7973 #12 2024-01-08 18:14:34 ~1 min tests 📄log
✔️ 5ec7973 #10 2024-01-08 18:15:36 ~2 min android 📦aar
✔️ 5ec7973 #10 2024-01-08 18:16:44 ~3 min linux 📦zip
✔️ 5ec7973 #10 2024-01-08 18:16:44 ~3 min ios 📦zip
✔️ bb9b54e #11 2024-01-08 18:33:36 ~1 min linux 📦zip
✔️ bb9b54e #11 2024-01-08 18:35:45 ~3 min ios 📦zip
✔️ bb9b54e #11 2024-01-08 18:36:18 ~4 min android 📦aar
✖️ bb9b54e #13 2024-01-08 18:52:37 ~20 min tests 📄log
✖️ bb9b54e #14 2024-01-08 19:22:57 ~20 min tests 📄log
✖️ bb9b54e #15 2024-01-08 20:05:01 ~32 min tests 📄log
✖️ bb9b54e #16 2024-01-08 21:29:01 ~32 min tests 📄log
✔️ bb9b54e #17 2024-01-08 22:21:29 ~38 min tests 📄log

Refactor the test helpers for pending transactions by extracting the mock implementations and helper functions into a new file `transactions/testhelpers.go`. Update event names for clarity and consistency in `pendingtxtracker.go`.


[ghstack-poisoned]
Refactor the test helpers for pending transactions by extracting the mock implementations and helper functions into a new file `transactions/testhelpers.go`. Update event names for clarity and consistency in `pendingtxtracker.go`.


[ghstack-poisoned]
Refactor the test helpers for pending transactions by extracting the mock implementations and helper functions into a new file `transactions/testhelpers.go`. Update event names for clarity and consistency in `pendingtxtracker.go`.


[ghstack-poisoned]
Refactor the test helpers for pending transactions by extracting the mock implementations and helper functions into a new file `transactions/testhelpers.go`. Update event names for clarity and consistency in `pendingtxtracker.go`.


[ghstack-poisoned]
"math/big"

"github.com/stretchr/testify/mock"

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: is this standard practice to have all these gaps between imports? would be cleaner if not imo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got import linting errors in CI and my local make lint doesn't work for me hence I did more than the usual separation of standard and external imports. Fixing them right now :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is back with error: File is not goimports-ed with -local github.com/ethereum/go-ethereum,github.com/status-im/status-go,github.com/waku-org/go-waku (goimports)

And my local make lint throws false positives:

make lint
ln: /Users/stefan/proj/status/status-desktop/vendor/status-go//.git/hooks: Not a directory
lint
WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused. 
WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused. 
WARN [runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused. 
WARN [runner] The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner. Replaced by revive. 
WARN [linters_context] structcheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649. 
services/wallet/bridge/bridge.go:53:18: t.HopTx.From undefined (type *HopTxArgs has no field or method From) (typecheck)
		return t.HopTx.From
		               ^
services/wallet/bridge/bridge.go:55:22: t.CbridgeTx.From undefined (type *CBridgeTxArgs has no field or method From) (typecheck)
		return t.CbridgeTx.From
		                   ^
services/wallet/bridge/bridge.go:57:29: t.ERC721TransferTx.From undefined (type *ERC721TransferTxArgs has no field or method From) (typecheck)

I'm going back to separating the imports based on account

Refactor the test helpers for pending transactions by extracting the mock implementations and helper functions into a new file `transactions/testhelpers.go`. Update event names for clarity and consistency in `pendingtxtracker.go`.


[ghstack-poisoned]
Refactor the test helpers for pending transactions by extracting the mock implementations and helper functions into a new file `transactions/testhelpers.go`. Update event names for clarity and consistency in `pendingtxtracker.go`.


[ghstack-poisoned]
@status-im-auto
Copy link
Member

✔️ status-go/prs/ios/PR-4492#11 🔹 ~4 min 38 sec 🔹 bb9b54e 🔹 📦 ios package

@stefandunca stefandunca merged commit bb9b54e into gh/stefandunca/2/base Jan 8, 2024
6 checks passed
@stefandunca stefandunca deleted the gh/stefandunca/2/head branch January 8, 2024 23:53
stefandunca added a commit that referenced this pull request Jan 9, 2024
Refactor the test helpers for pending transactions by extracting the mock
implementations and helper functions into a new file `transactions/testhelpers.go`.

Update event names for clarity and consistency in `pendingtxtracker.go`.

Updates status-desktop: [#13124](status-im/status-desktop#13124)

ghstack-source-id: d85756b80fefd3bf7590637cb7f4dc1af615cecd
Pull Request resolved: #4492
stefandunca added a commit that referenced this pull request Jan 10, 2024
Refactor the test helpers for pending transactions by extracting the mock
implementations and helper functions into a new file `transactions/testhelpers.go`.

Update event names for clarity and consistency in `pendingtxtracker.go`.

Updates status-desktop: [#13124](status-im/status-desktop#13124)

ghstack-source-id: d85756b80fefd3bf7590637cb7f4dc1af615cecd
Pull Request resolved: #4492
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants