mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-06-02 15:20:01 +00:00
fix(wallet): merge postfix
This commit is contained in:
parent
8965f70051
commit
89bf1e9422
@ -3,7 +3,7 @@ use common::HashType;
|
||||
use nssa::{AccountId, program::Program};
|
||||
use token_core::TokenHolding;
|
||||
|
||||
use crate::{AccountIdentity, ExecutionFailureKind, WalletCore};
|
||||
use crate::{AccountIdentity, ExecutionFailureKind, WalletCore, cli::CliAccountMention};
|
||||
pub struct Amm<'wallet>(pub &'wallet WalletCore);
|
||||
|
||||
impl Amm<'_> {
|
||||
@ -15,9 +15,9 @@ impl Amm<'_> {
|
||||
user_holding_lp: AccountId,
|
||||
balance_a: u128,
|
||||
balance_b: u128,
|
||||
a_mention: &CliAccountMention,
|
||||
b_mention: &CliAccountMention,
|
||||
lp_mention: &CliAccountMention,
|
||||
_a_mention: &CliAccountMention,
|
||||
_b_mention: &CliAccountMention,
|
||||
_lp_mention: &CliAccountMention,
|
||||
) -> Result<HashType, ExecutionFailureKind> {
|
||||
let program = Program::amm();
|
||||
let amm_program_id = Program::amm().id();
|
||||
@ -77,8 +77,8 @@ impl Amm<'_> {
|
||||
swap_amount_in: u128,
|
||||
min_amount_out: u128,
|
||||
token_definition_id_in: AccountId,
|
||||
a_mention: &CliAccountMention,
|
||||
b_mention: &CliAccountMention,
|
||||
_a_mention: &CliAccountMention,
|
||||
_b_mention: &CliAccountMention,
|
||||
) -> Result<HashType, ExecutionFailureKind> {
|
||||
let program = Program::amm();
|
||||
let amm_program_id = Program::amm().id();
|
||||
@ -155,8 +155,8 @@ impl Amm<'_> {
|
||||
exact_amount_out: u128,
|
||||
max_amount_in: u128,
|
||||
token_definition_id_in: AccountId,
|
||||
a_mention: &CliAccountMention,
|
||||
b_mention: &CliAccountMention,
|
||||
_a_mention: &CliAccountMention,
|
||||
_b_mention: &CliAccountMention,
|
||||
) -> Result<HashType, ExecutionFailureKind> {
|
||||
let program = Program::amm();
|
||||
let amm_program_id = Program::amm().id();
|
||||
@ -234,9 +234,9 @@ impl Amm<'_> {
|
||||
min_amount_liquidity: u128,
|
||||
max_amount_to_add_token_a: u128,
|
||||
max_amount_to_add_token_b: u128,
|
||||
a_mention: &CliAccountMention,
|
||||
b_mention: &CliAccountMention,
|
||||
lp_mention: &CliAccountMention,
|
||||
_a_mention: &CliAccountMention,
|
||||
_b_mention: &CliAccountMention,
|
||||
_lp_mention: &CliAccountMention,
|
||||
) -> Result<HashType, ExecutionFailureKind> {
|
||||
let program = Program::amm();
|
||||
let amm_program_id = Program::amm().id();
|
||||
@ -297,7 +297,7 @@ impl Amm<'_> {
|
||||
remove_liquidity_amount: u128,
|
||||
min_amount_to_remove_token_a: u128,
|
||||
min_amount_to_remove_token_b: u128,
|
||||
lp_mention: &CliAccountMention,
|
||||
_lp_mention: &CliAccountMention,
|
||||
) -> Result<HashType, ExecutionFailureKind> {
|
||||
let program = Program::amm();
|
||||
let amm_program_id = Program::amm().id();
|
||||
|
||||
@ -7,7 +7,7 @@ use nssa::{
|
||||
};
|
||||
use nssa_core::SharedSecretKey;
|
||||
|
||||
use crate::{AccountIdentity, ExecutionFailureKind, WalletCore};
|
||||
use crate::{AccountIdentity, ExecutionFailureKind, WalletCore, cli::CliAccountMention};
|
||||
|
||||
pub struct Ata<'wallet>(pub &'wallet WalletCore);
|
||||
|
||||
@ -16,7 +16,7 @@ impl Ata<'_> {
|
||||
&self,
|
||||
owner_id: AccountId,
|
||||
definition_id: AccountId,
|
||||
owner_mention: &CliAccountMention,
|
||||
_owner_mention: &CliAccountMention,
|
||||
) -> Result<HashType, ExecutionFailureKind> {
|
||||
let program = Program::ata();
|
||||
let ata_program_id = program.id();
|
||||
@ -47,7 +47,7 @@ impl Ata<'_> {
|
||||
definition_id: AccountId,
|
||||
recipient_id: AccountId,
|
||||
amount: u128,
|
||||
owner_mention: &CliAccountMention,
|
||||
_owner_mention: &CliAccountMention,
|
||||
) -> Result<HashType, ExecutionFailureKind> {
|
||||
let program = Program::ata();
|
||||
let ata_program_id = program.id();
|
||||
@ -80,7 +80,7 @@ impl Ata<'_> {
|
||||
owner_id: AccountId,
|
||||
definition_id: AccountId,
|
||||
amount: u128,
|
||||
owner_mention: &CliAccountMention,
|
||||
_owner_mention: &CliAccountMention,
|
||||
) -> Result<HashType, ExecutionFailureKind> {
|
||||
let program = Program::ata();
|
||||
let ata_program_id = program.id();
|
||||
|
||||
@ -3,7 +3,7 @@ use nssa::AccountId;
|
||||
use nssa_core::{Identifier, NullifierPublicKey, SharedSecretKey, encryption::ViewingPublicKey};
|
||||
|
||||
use super::{NativeTokenTransfer, auth_transfer_preparation};
|
||||
use crate::{AccountIdentity, ExecutionFailureKind};
|
||||
use crate::{AccountIdentity, ExecutionFailureKind, cli::CliAccountMention};
|
||||
|
||||
impl NativeTokenTransfer<'_> {
|
||||
pub async fn send_shielded_transfer(
|
||||
|
||||
@ -3,7 +3,7 @@ use nssa::{AccountId, program::Program};
|
||||
use nssa_core::{Identifier, NullifierPublicKey, SharedSecretKey, encryption::ViewingPublicKey};
|
||||
use token_core::Instruction;
|
||||
|
||||
use crate::{AccountIdentity, ExecutionFailureKind, WalletCore};
|
||||
use crate::{AccountIdentity, ExecutionFailureKind, WalletCore, cli::CliAccountMention};
|
||||
|
||||
pub struct Token<'wallet>(pub &'wallet WalletCore);
|
||||
|
||||
@ -14,8 +14,8 @@ impl Token<'_> {
|
||||
supply_account_id: AccountId,
|
||||
name: String,
|
||||
total_supply: u128,
|
||||
definition_mention: &CliAccountMention,
|
||||
supply_mention: &CliAccountMention,
|
||||
_definition_mention: &CliAccountMention,
|
||||
_supply_mention: &CliAccountMention,
|
||||
) -> Result<HashType, ExecutionFailureKind> {
|
||||
let program = Program::token();
|
||||
let instruction = Instruction::NewFungibleDefinition { name, total_supply };
|
||||
@ -139,8 +139,8 @@ impl Token<'_> {
|
||||
sender_account_id: AccountId,
|
||||
recipient_account_id: AccountId,
|
||||
amount: u128,
|
||||
sender_mention: &CliAccountMention,
|
||||
recipient_mention: &CliAccountMention,
|
||||
_sender_mention: &CliAccountMention,
|
||||
_recipient_mention: &CliAccountMention,
|
||||
) -> Result<HashType, ExecutionFailureKind> {
|
||||
let program = Program::token();
|
||||
let instruction = Instruction::Transfer {
|
||||
@ -346,7 +346,7 @@ impl Token<'_> {
|
||||
definition_account_id: AccountId,
|
||||
holder_account_id: AccountId,
|
||||
amount: u128,
|
||||
holder_mention: &CliAccountMention,
|
||||
_holder_mention: &CliAccountMention,
|
||||
) -> Result<HashType, ExecutionFailureKind> {
|
||||
let program = Program::token();
|
||||
let instruction = Instruction::Burn {
|
||||
@ -475,8 +475,8 @@ impl Token<'_> {
|
||||
definition_account_id: AccountId,
|
||||
holder_account_id: AccountId,
|
||||
amount: u128,
|
||||
definition_mention: &CliAccountMention,
|
||||
holder_mention: &CliAccountMention,
|
||||
_definition_mention: &CliAccountMention,
|
||||
_holder_mention: &CliAccountMention,
|
||||
) -> Result<HashType, ExecutionFailureKind> {
|
||||
let program = Program::token();
|
||||
let instruction = Instruction::Mint {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user