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

Kaspawallet: implement fee calcs, centralize constant and logic #2107

Draft
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

D-Stacks
Copy link
Contributor

@D-Stacks D-Stacks commented Jun 26, 2022

  1. Move fee calcs, logic and constants to libkaspawallet
  2. Allow for functions to calculate transaction(s) fees

@D-Stacks D-Stacks changed the title Kaspawalletlib: implement fee calcs in kaspawalletlib Kaspawallet: implement fee calcs and centralize logic. Jun 26, 2022
@codecov
Copy link

codecov bot commented Jun 26, 2022

Codecov Report

Merging #2107 (4c10273) into dev (b9093d5) will decrease coverage by 0.08%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##              dev    #2107       /-   ##
==========================================
- Coverage   59.19%   59.10%   -0.09%     
==========================================
  Files         678      679        1     
  Lines       32831    32854       23     
==========================================
- Hits        19434    19419      -15     
- Misses      10596    10629       33     
- Partials     2801     2806        5     
Impacted Files Coverage Δ
...allet/daemon/server/create_unsigned_transaction.go 0.00% <0.00%> (ø)
...pawallet/daemon/server/external_spendable_utxos.go 0.00% <0.00%> (ø)
cmd/kaspawallet/daemon/server/split_transaction.go 7.64% <0.00%> (ø)
cmd/kaspawallet/libkaspawallet/fees.go 0.00% <0.00%> (ø)
cmd/kaspawallet/parse.go 0.00% <0.00%> (ø)
cmd/kaspawallet/sweep.go 0.00% <0.00%> (ø)
...tructure/network/rpcclient/rpc_on_chain_changed.go 52.38% <0.00%> (-14.29%) ⬇️
...k/netadapter/server/grpcserver/connection_loops.go 56.89% <0.00%> (-5.18%) ⬇️
...ructure/network/rpcclient/grpcclient/grpcclient.go 76.56% <0.00%> (-4.69%) ⬇️
infrastructure/network/netadapter/router/route.go 72.72% <0.00%> (-4.55%) ⬇️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b9093d5...4c10273. Read the comment docs.

@D-Stacks D-Stacks marked this pull request as draft June 29, 2022 22:37
@D-Stacks
Copy link
Contributor Author

D-Stacks commented Jun 29, 2022

Converting back to draft: Makes more sense to optionally return the whole tx, this can be used by clients to send, and get tx data for post-analysis, no reason to limit this feature in the Send call to just return fees.

@D-Stacks D-Stacks changed the title Kaspawallet: implement fee calcs and centralize logic. Kaspawallet: implement fee calcs, and centralize logic. Jun 29, 2022
@D-Stacks D-Stacks changed the title Kaspawallet: implement fee calcs, and centralize logic. Kaspawallet: implement fee calcs, centralize logic, Make send return whole txs. Jun 29, 2022
@D-Stacks
Copy link
Contributor Author

I will split this into two dependent prs, one for feecalcs, one for sending back whole tx data, seems to make the most sense.

@D-Stacks D-Stacks changed the title Kaspawallet: implement fee calcs, centralize logic, Make send return whole txs. Kaspawallet: implement fee calcs, centralize constant and logic Jun 30, 2022
@D-Stacks D-Stacks marked this pull request as ready for review June 30, 2022 13:48
@someone235 someone235 marked this pull request as draft July 21, 2022 10:25
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.

1 participant