Skip to content

Commit 972df8b

Browse files
committed
feat: wip channels
1 parent 8a36797 commit 972df8b

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

apps/namadillo/src/App/Ibc/OsmosisSwap.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { getSdkInstance } from "utils/sdk";
2222

2323
const SLIPPAGE = 0.005;
2424
const SWAP_CONTRACT_ADDRESS =
25-
"osmo1lrlqeq38ephw8mz0c3uzfdpt4fh3fr0s2atur5n33md90m4wx3mqmz7fq6";
25+
"osmo14q5zmg3fp774kpz2j8c52q7gqjn0dnm3vcj3guqpj4p9xylqpc7s2ezh0h";
2626

2727
export const OsmosisSwap: React.FC = () => {
2828
const { mutateAsync: performOsmosisSwap } = useAtomValue(
@@ -134,7 +134,7 @@ export const OsmosisSwap: React.FC = () => {
134134
const transfer = {
135135
amountInBaseDenom: BigNumber(amount),
136136
// osmosis channel
137-
channelId: "channel-7",
137+
channelId: "channel-1",
138138
portId: "transfer",
139139
token: from.asset.address,
140140
source: shieldedAccount.pseudoExtendedKey!,
@@ -179,6 +179,7 @@ export const OsmosisSwap: React.FC = () => {
179179
transparentAccount.address!
180180
);
181181
const wwww = await broadcastTransaction(encodedTxData, signedTxs);
182+
//eslint-disable-next-line no-console
182183
console.log("Transaction broadcasted:", wwww);
183184
alert("Transaction sent 🚀");
184185
} catch (error) {

apps/namadillo/src/lib/query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export const signTx = async <T>(
170170
const store = getDefaultStore();
171171
const { data: chainParameters } = store.get(chainParametersAtom);
172172
// eslint-disable-next-line @typescript-eslint/no-explicit-any
173-
const checksums = (chainParameters?.checksums as any).current;
173+
const checksums = chainParameters?.checksums;
174174

175175
try {
176176
// Sign txs

packages/shared/lib/src/sdk/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,11 @@ impl Sdk {
908908
self.namada.native_token(),
909909
)?;
910910

911+
web_sys::console::log_1(&format!(
912+
"Building osmosis swap with args: {:?}",
913+
args
914+
).into());
915+
911916
let _ = &self
912917
.namada
913918
.shielded_mut()
@@ -919,6 +924,7 @@ impl Sdk {
919924
let tx = args
920925
.into_ibc_transfer(&self.namada, |_route, _min_amount, _quote_amount| true)
921926
.await?;
927+
web_sys::console::log_1(&format!("Built osmosis swap tx: {:?}", tx).into());
922928

923929
let bparams = if let Some(bparams) = bparams {
924930
BuildParams::StoredBuildParams(bparams)

0 commit comments

Comments
 (0)