-
Notifications
You must be signed in to change notification settings - Fork 59
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
fix: exclude active exiting utxos from calls to /account.get_exitable_utxos #1505
fix: exclude active exiting utxos from calls to /account.get_exitable_utxos #1505
Conversation
…xitable_utxos API
/account.get_exitable_utxos
/account.get_exitable_utxos
968649f
to
24163df
Compare
21028db
to
f39a246
Compare
@@ -63,5 +66,44 @@ defmodule OMG.Watcher.API.AccountTest do | |||
|
|||
assert %{blknum: ^blknum, txindex: ^txindex, oindex: ^oindex} = utxo | |||
end | |||
|
|||
@tag fixtures: [:db_initialized] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will get rid of this fixture before making it ready to review, but review comments are welcomed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we're heading to ditch all fixtures, once they already there. Such fixtures are very useful and also keeps the codebase clean. That's my opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. I like them to. The problem we have is that if test uses a fixture defined in other app it can be run only in bulk, not as a single test. There might be a problem in how we designed tests. In this case removing fixture was easy, so I did it.
f39a246
to
329e05a
Compare
329e05a
to
cf760f3
Compare
…gnized_as_unspendable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@@ -63,5 +66,44 @@ defmodule OMG.Watcher.API.AccountTest do | |||
|
|||
assert %{blknum: ^blknum, txindex: ^txindex, oindex: ^oindex} = utxo | |||
end | |||
|
|||
@tag fixtures: [:db_initialized] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we're heading to ditch all fixtures, once they already there. Such fixtures are very useful and also keeps the codebase clean. That's my opinion.
f92cfc3
to
9708bb6
Compare
@eth OMG.Eth.zero_address() | ||
@payment_output_type OMG.WireFormatTypes.output_type_for(:output_payment_v1) | ||
|
||
setup do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on moving fixture to setup, this makes it more explicit, plus avoids deep fixture inheritance that fixtures allow
…gnized_as_unspendable
Closes https://github.com/omisego/security-issues/issues/30
Overview
Active exiting utxos are excluded from
/account.get_exitable_utxos
response.