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

Testnet tx summary #23

Merged
merged 2 commits into from
Nov 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/target
Cargo.lock

.DS_Store
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "manta-signer"
edition = "2018"
version = "0.3.0"
version = "0.4.0"
authors = ["Manta Network <contact@manta.network>"]
readme = "README.md"
license-file = "LICENSE"
Expand Down
21 changes: 9 additions & 12 deletions src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ use async_std::{
use codec::{Decode, Encode};
use http_types::headers::HeaderValue;
use manta_api::{
DeriveShieldedAddressParams, GenerateAssetParams, GeneratePrivateTransferBatchParams,
GenerateReclaimBatchParams, RecoverAccountParams,
get_private_transfer_batch_params_currency_symbol, get_private_transfer_batch_params_recipient,
get_private_transfer_batch_params_value, get_reclaim_batch_params_currency_symbol,
get_reclaim_batch_params_value, DeriveShieldedAddressParams, GenerateAssetParams,
GeneratePrivateTransferBatchParams, GenerateReclaimBatchParams, RecoverAccountParams,
};
use manta_asset::AssetId;
use manta_crypto::MantaSerDes;
Expand Down Expand Up @@ -101,15 +103,10 @@ impl From<&GeneratePrivateTransferBatchParams> for TransactionSummary {
fn from(params: &GeneratePrivateTransferBatchParams) -> Self {
Self {
kind: TransactionKind::PrivateTransfer {
recipient: bs58::encode(params.receiving_address.encode()).into_string(),
recipient: get_private_transfer_batch_params_recipient(params),
},
amount: params
.private_transfer_params_list
.last()
.unwrap()
.non_change_output_value
.to_string(),
currency_symbol: get_currency_symbol_by_asset_id(params.asset_id),
amount: get_private_transfer_batch_params_value(params),
currency_symbol: get_private_transfer_batch_params_currency_symbol(params),
}
}
}
Expand All @@ -119,8 +116,8 @@ impl From<&GenerateReclaimBatchParams> for TransactionSummary {
fn from(params: &GenerateReclaimBatchParams) -> Self {
Self {
kind: TransactionKind::Reclaim,
amount: params.reclaim_params.reclaim_value.to_string(),
currency_symbol: get_currency_symbol_by_asset_id(params.reclaim_params.asset_id),
amount: get_reclaim_batch_params_value(params),
currency_symbol: get_reclaim_batch_params_currency_symbol(params),
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "manta-signer-ui",
"version": "0.3.0",
"version": "0.4.0",
"private": true,
"dependencies": {
"@tauri-apps/api": "^1.0.0-beta.8",
Expand Down Expand Up @@ -43,4 +43,4 @@
"devDependencies": {
"@tauri-apps/cli": "^1.0.0-beta.10"
}
}
}
4 changes: 2 additions & 2 deletions ui/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.