Skip to content

Commit

Permalink
Merge pull request #23 from Manta-Network/testnet_tx_summary
Browse files Browse the repository at this point in the history
Testnet tx summary
  • Loading branch information
stechu authored Nov 28, 2021
2 parents 4fecf08 + 16e7bed commit aaa054a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 18 deletions.
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 <[email protected]>"]
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.

0 comments on commit aaa054a

Please sign in to comment.