Datetime in the UI
This commit is contained in:
parent
3ab81bfd52
commit
b99dc5bfd6
|
@ -1011,7 +1011,7 @@ version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"zecwalletlitelib 0.1.0 (git+https://github.com/adityapk00/zecwallet-light-cli?rev=4518965a41f7e4b253a4943a760af76fefc878df)",
|
"zecwalletlitelib 0.1.0 (git+https://github.com/adityapk00/zecwallet-light-cli?rev=e3a0fd2dea59c0cf6434148bf77fef84830cce02)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -2182,7 +2182,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zecwalletlitelib"
|
name = "zecwalletlitelib"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/adityapk00/zecwallet-light-cli?rev=4518965a41f7e4b253a4943a760af76fefc878df#4518965a41f7e4b253a4943a760af76fefc878df"
|
source = "git+https://github.com/adityapk00/zecwallet-light-cli?rev=e3a0fd2dea59c0cf6434148bf77fef84830cce02#e3a0fd2dea59c0cf6434148bf77fef84830cce02"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bellman 0.1.0 (git+https://github.com/adityapk00/librustzcash.git?rev=188537ea025fcb7fbdfc11266f307a084a5451e4)",
|
"bellman 0.1.0 (git+https://github.com/adityapk00/librustzcash.git?rev=188537ea025fcb7fbdfc11266f307a084a5451e4)",
|
||||||
|
@ -2467,4 +2467,4 @@ dependencies = [
|
||||||
"checksum zcash_client_backend 0.0.0 (git+https://github.com/adityapk00/librustzcash.git?rev=188537ea025fcb7fbdfc11266f307a084a5451e4)" = "<none>"
|
"checksum zcash_client_backend 0.0.0 (git+https://github.com/adityapk00/librustzcash.git?rev=188537ea025fcb7fbdfc11266f307a084a5451e4)" = "<none>"
|
||||||
"checksum zcash_primitives 0.0.0 (git+https://github.com/adityapk00/librustzcash.git?rev=188537ea025fcb7fbdfc11266f307a084a5451e4)" = "<none>"
|
"checksum zcash_primitives 0.0.0 (git+https://github.com/adityapk00/librustzcash.git?rev=188537ea025fcb7fbdfc11266f307a084a5451e4)" = "<none>"
|
||||||
"checksum zcash_proofs 0.0.0 (git+https://github.com/adityapk00/librustzcash.git?rev=188537ea025fcb7fbdfc11266f307a084a5451e4)" = "<none>"
|
"checksum zcash_proofs 0.0.0 (git+https://github.com/adityapk00/librustzcash.git?rev=188537ea025fcb7fbdfc11266f307a084a5451e4)" = "<none>"
|
||||||
"checksum zecwalletlitelib 0.1.0 (git+https://github.com/adityapk00/zecwallet-light-cli?rev=4518965a41f7e4b253a4943a760af76fefc878df)" = "<none>"
|
"checksum zecwalletlitelib 0.1.0 (git+https://github.com/adityapk00/zecwallet-light-cli?rev=e3a0fd2dea59c0cf6434148bf77fef84830cce02)" = "<none>"
|
||||||
|
|
|
@ -11,4 +11,4 @@ crate-type = ["staticlib"]
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libc = "0.2.58"
|
libc = "0.2.58"
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
zecwalletlitelib = { git = "https://github.com/adityapk00/zecwallet-light-cli", rev = "4518965a41f7e4b253a4943a760af76fefc878df" }
|
zecwalletlitelib = { git = "https://github.com/adityapk00/zecwallet-light-cli", rev = "e3a0fd2dea59c0cf6434148bf77fef84830cce02" }
|
|
@ -331,7 +331,7 @@ void Controller::refreshTransactions() {
|
||||||
|
|
||||||
for (auto o: it["outgoing_metadata"].get<json::array_t>()) {
|
for (auto o: it["outgoing_metadata"].get<json::array_t>()) {
|
||||||
QString address = QString::fromStdString(o["address"]);
|
QString address = QString::fromStdString(o["address"]);
|
||||||
qint64 amount = o["value"].get<json::number_unsigned_t>();
|
qint64 amount = -1 * o["value"].get<json::number_integer_t>(); // Sent items are -ve
|
||||||
|
|
||||||
QString memo;
|
QString memo;
|
||||||
if (!o["memo"].is_null()) {
|
if (!o["memo"].is_null()) {
|
||||||
|
@ -350,7 +350,7 @@ void Controller::refreshTransactions() {
|
||||||
|
|
||||||
txdata.push_back(TransactionItem{
|
txdata.push_back(TransactionItem{
|
||||||
"Sent",
|
"Sent",
|
||||||
it["block_height"].get<json::number_unsigned_t>(),
|
it["datetime"].get<json::number_unsigned_t>(),
|
||||||
address,
|
address,
|
||||||
QString::fromStdString(it["txid"]),
|
QString::fromStdString(it["txid"]),
|
||||||
model->getLatestBlock() - it["block_height"].get<json::number_unsigned_t>(),
|
model->getLatestBlock() - it["block_height"].get<json::number_unsigned_t>(),
|
||||||
|
@ -361,9 +361,15 @@ void Controller::refreshTransactions() {
|
||||||
address = (it["address"].is_null() ? "" : QString::fromStdString(it["address"]));
|
address = (it["address"].is_null() ? "" : QString::fromStdString(it["address"]));
|
||||||
model->markAddressUsed(address);
|
model->markAddressUsed(address);
|
||||||
|
|
||||||
|
items.push_back(TransactionItemDetail{
|
||||||
|
address,
|
||||||
|
it["amount"].get<json::number_integer_t>(),
|
||||||
|
""
|
||||||
|
});
|
||||||
|
|
||||||
TransactionItem tx{
|
TransactionItem tx{
|
||||||
"Receive",
|
"Receive",
|
||||||
it["block_height"].get<json::number_unsigned_t>(),
|
it["datetime"].get<json::number_unsigned_t>(),
|
||||||
address,
|
address,
|
||||||
QString::fromStdString(it["txid"]),
|
QString::fromStdString(it["txid"]),
|
||||||
model->getLatestBlock() - it["block_height"].get<json::number_unsigned_t>(),
|
model->getLatestBlock() - it["block_height"].get<json::number_unsigned_t>(),
|
||||||
|
|
Loading…
Reference in New Issue