Page MenuHomePhabricator

Complete explicit Amount construction in Qt code
ClosedPublic

Authored by schancel on Dec 11 2017, 19:10.

Details

Summary

Explicitly construct Amount types.

Depends on D789.

Test Plan

make check
Run QT GUI

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

deadalnix requested changes to this revision.Dec 11 2017, 19:43
deadalnix added inline comments.
src/qt/bitcoinamountfield.cpp
138 ↗(On Diff #2044)
Amount val(0);
src/qt/paymentrequestplus.cpp
229 ↗(On Diff #2044)

Make that thing return an amount.

src/qt/walletmodel.cpp
179 ↗(On Diff #2044)
Amount total(0);
198 ↗(On Diff #2044)

dito

204 ↗(On Diff #2044)

Make this amount function return an amount.

src/qt/walletview.cpp
195 ↗(On Diff #2044)

One would expect amount to be an amount.

This revision now requires changes to proceed.Dec 11 2017, 19:43
src/qt/paymentrequestplus.cpp
229 ↗(On Diff #2044)

It looks like it's protobufs stuff. I looked into it.

payments:: stuff is coming from protobufs definitions.`. I'm not sure about adding Amount class to that.

// Generalized form of "send payment to this/these bitcoin cash addresses"
message Output {
	optional uint64 amount = 1 [default = 0]; // amount is integer-number-of-satoshis
	required bytes script = 2; // usually one of the standard Script forms
}
deadalnix added inline comments.
src/qt/paymentrequestplus.cpp
229 ↗(On Diff #2044)

ok

This revision is now accepted and ready to land.Dec 11 2017, 23:48
This revision was automatically updated to reflect the committed changes.