Skip to content

Commit

Permalink
fix: rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszjasiuk committed Oct 30, 2024
1 parent 1f569f7 commit c31fe49
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 14 deletions.
3 changes: 3 additions & 0 deletions apps/namadillo/vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ export default defineConfig(() => {
overlay: { initialIsOpen: false },
}),
],
worker: {
plugins: () => [tsconfigPaths()],
},
optimizeDeps: {
esbuildOptions: {
// Node.js global to browser globalThis
Expand Down
2 changes: 0 additions & 2 deletions packages/shared/lib/.cargo/config

This file was deleted.

2 changes: 1 addition & 1 deletion packages/shared/lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license = "MIT"
crate-type = ["cdylib", "rlib"]

[features]
default = []
default = ["web"]
dev = []
multicore = ["rayon", "wasm-bindgen-rayon", "namada_sdk/multicore"]
nodejs = []
Expand Down
4 changes: 2 additions & 2 deletions packages/shared/lib/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ use namada_sdk::state::BlockHeight;
use namada_sdk::state::Key;
use namada_sdk::token;
use namada_sdk::tx::{
TX_BOND_WASM, TX_CLAIM_REWARDS_WASM, TX_REDELEGATE_WASM, TX_REVEAL_PK, TX_TRANSFER_WASM,
TX_UNBOND_WASM, TX_VOTE_PROPOSAL, TX_WITHDRAW_WASM, TX_IBC_WASM,
TX_BOND_WASM, TX_CLAIM_REWARDS_WASM, TX_IBC_WASM, TX_REDELEGATE_WASM, TX_REVEAL_PK,
TX_TRANSFER_WASM, TX_UNBOND_WASM, TX_VOTE_PROPOSAL, TX_WITHDRAW_WASM,
};
use namada_sdk::uint::I256;
use namada_sdk::wallet::DatedKeypair;
Expand Down
9 changes: 9 additions & 0 deletions packages/shared/lib/src/sdk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ use crate::utils::to_js_result;
use args::{generate_masp_build_params, masp_sign, BuildParams};
use gloo_utils::format::JsValueSerdeExt;
use namada_sdk::address::Address;
use namada_sdk::address::MASP;
use namada_sdk::args::GenIbcShieldingTransfer;
use namada_sdk::args::InputAmount;
use namada_sdk::args::Query;
use namada_sdk::args::TxExpiration;
use namada_sdk::borsh::{self, BorshDeserialize};
use namada_sdk::eth_bridge::bridge_pool::build_bridge_pool_tx;
use namada_sdk::hash::Hash;
Expand All @@ -28,6 +33,8 @@ use namada_sdk::masp_primitives::zip32::{ExtendedFullViewingKey, ExtendedKey};
use namada_sdk::rpc::{query_epoch, InnerTxResult};
use namada_sdk::signing::SigningTxData;
use namada_sdk::string_encoding::Format;
use namada_sdk::tendermint_rpc::Url;
use namada_sdk::token::DenominatedAmount;
use namada_sdk::token::{MaspTxId, OptionExt};
use namada_sdk::tx::{
build_batch, build_bond, build_claim_rewards, build_ibc_transfer, build_redelegation,
Expand All @@ -37,6 +44,8 @@ use namada_sdk::tx::{
ProcessTxResponse, Tx,
};
use namada_sdk::wallet::{Store, Wallet};
use namada_sdk::PaymentAddress;
use namada_sdk::TransferTarget;
use namada_sdk::{Namada, NamadaImpl};
use std::collections::BTreeMap;
use std::str::FromStr;
Expand Down
14 changes: 7 additions & 7 deletions packages/shared/lib/src/sdk/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ use namada_sdk::borsh::BorshSerializeExt;
use namada_sdk::token::Transfer;

use namada_sdk::governance::VoteProposalData;
use namada_sdk::ibc::core::channel::types::timeout::TimeoutHeight;
use namada_sdk::ibc::MsgTransfer;
use namada_sdk::tx::data::pos::{Bond, ClaimRewards, Redelegation, Unbond, Withdraw};
use namada_sdk::{
borsh::{self, BorshDeserialize},
key::common::PublicKey,
};
use namada_sdk::ibc::MsgTransfer;
use namada_sdk::ibc::core::channel::types::timeout::TimeoutHeight;
use wasm_bindgen::JsError;

use crate::sdk::{
args::{
BondMsg, ClaimRewardsMsg, RedelegateMsg, RevealPkMsg, TransferDataMsg, TransferMsg,
UnbondMsg, VoteProposalMsg, WithdrawMsg, IbcTransferMsg
BondMsg, ClaimRewardsMsg, IbcTransferMsg, RedelegateMsg, RevealPkMsg, TransferDataMsg,
TransferMsg, UnbondMsg, VoteProposalMsg, WithdrawMsg,
},
tx::TxType,
};
Expand Down Expand Up @@ -190,7 +190,7 @@ impl TransactionKind {

let timeout_height = match message.timeout_height_on_b {
TimeoutHeight::At(height) => Some(height.revision_height()),
TimeoutHeight::Never => None
TimeoutHeight::Never => None,
};

let ibc_transfer_msg = IbcTransferMsg::new(
Expand All @@ -203,10 +203,10 @@ impl TransactionKind {
timeout_height,
None,
Some(message.packet_data.memo.to_string()),
None
None,
);
borsh::to_vec(&ibc_transfer_msg)?
},
}
_ => panic!("Unsupported Tx provided, cannot serialize"),
};

Expand Down
4 changes: 2 additions & 2 deletions packages/shared/lib/src/sdk/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ use namada_sdk::signing::SigningTxData;
use namada_sdk::tx::data::compute_inner_tx_hash;
use namada_sdk::tx::either::Either;
use namada_sdk::tx::{
self, TX_BOND_WASM, TX_CLAIM_REWARDS_WASM, TX_REDELEGATE_WASM, TX_REVEAL_PK, TX_TRANSFER_WASM,
TX_UNBOND_WASM, TX_VOTE_PROPOSAL, TX_WITHDRAW_WASM, TX_IBC_WASM,
self, TX_BOND_WASM, TX_CLAIM_REWARDS_WASM, TX_IBC_WASM, TX_REDELEGATE_WASM, TX_REVEAL_PK,
TX_TRANSFER_WASM, TX_UNBOND_WASM, TX_VOTE_PROPOSAL, TX_WITHDRAW_WASM,
};
use namada_sdk::uint::Uint;
use namada_sdk::{address::Address, key::common::PublicKey};
Expand Down

0 comments on commit c31fe49

Please sign in to comment.