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

fix the withdrawn amount unit #7563

Merged
merged 3 commits into from
Oct 27, 2021
Merged

fix the withdrawn amount unit #7563

merged 3 commits into from
Oct 27, 2021

Conversation

jennijuju
Copy link
Member

@jennijuju jennijuju commented Oct 26, 2021

fixes #7561
shown in FIL

$lsp actor withdraw --confidence=1 0.0000000000004
Requested rewards withdrawal in message bafy2bzacebsv3z5ttd6mwyzs7xtvip2mwwzftrl2hgry2z4ljfailkeis7mbm
waiting for 1 epochs for confirmation..
Successfully withdrew 4e-13 FIL 


$lsp actor withdraw --confidence=1 200 
Requested rewards withdrawal in message bafy2bzacebgzb4fko4a2zdp4xmtoykukmcqovkmi3tursej7mtwmbabr3xp56
waiting for 1 epochs for confirmation..
Successfully withdrew 200 FIL 

@jennijuju jennijuju requested a review from a team as a code owner October 26, 2021 18:30
@codecov
Copy link

codecov bot commented Oct 26, 2021

Codecov Report

Merging #7563 (dc6bd2b) into master (6607019) will decrease coverage by 0.07%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7563      +/-   ##
==========================================
- Coverage   39.85%   39.78%   -0.08%     
==========================================
  Files         633      633              
  Lines       67098    67098              
==========================================
- Hits        26742    26694      -48     
- Misses      35758    35798      +40     
- Partials     4598     4606       +8     
Impacted Files Coverage Δ
cli/wallet.go 0.00% <0.00%> (ø)
cmd/lotus-miner/actor.go 7.92% <0.00%> (ø)
cmd/lotus-shed/actor.go 0.00% <0.00%> (ø)
chain/stmgr/call.go 67.87% <0.00%> (-7.28%) ⬇️
chain/events/observer.go 71.64% <0.00%> (-6.72%) ⬇️
chain/stmgr/execute.go 86.95% <0.00%> (-4.35%) ⬇️
markets/storageadapter/ondealsectorcommitted.go 77.33% <0.00%> (-4.00%) ⬇️
node/hello/hello.go 63.63% <0.00%> (-3.41%) ⬇️
miner/miner.go 56.95% <0.00%> (-1.66%) ⬇️
itests/kit/blockminer.go 93.65% <0.00%> (-1.59%) ⬇️
... and 13 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 6607019...dc6bd2b. Read the comment docs.

@@ -122,6 +124,12 @@ func ParseFIL(s string) (FIL, error) {
return FIL{r.Num()}, nil
}

func ParseAttoFilToFIL(atto abi.TokenAmount) string {
Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't call it Parse, rather Format. Parse is usually reserved from going from string -> number.

Copy link
Member Author

Choose a reason for hiding this comment

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

removed this function since we have a better thing already!

Copy link
Contributor

@Kubuxu Kubuxu left a comment

Choose a reason for hiding this comment

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

I think types.FIL(withdrawn) should already fulfil the same purpose.
Please reject the review if for some reason it doesn't.

@jennijuju
Copy link
Member Author

I think types.FIL(withdrawn) should already fulfil the same purpose.
Please reject the review if for some reason it doesn't.

You are totally right! updated!

@jennijuju jennijuju requested a review from Kubuxu October 27, 2021 00:54
@jennijuju jennijuju merged commit 8efc805 into master Oct 27, 2021
@jennijuju jennijuju deleted the jen/7561 branch October 27, 2021 01:13
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.

Withdraw return value is in attofil but shown as fil
4 participants