Skip to content

Commit 9977323

Browse files
committed
chore: cleanup
1 parent dbc8f41 commit 9977323

File tree

4 files changed

+4
-86
lines changed

4 files changed

+4
-86
lines changed

apps/namadillo/src/App/Masp/MaspUnshield.tsx

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -149,56 +149,6 @@ export const MaspUnshield: React.FC = () => {
149149
}
150150
};
151151

152-
// const maxAmount = useMemo(() => {
153-
// if (!selectedAsset) {
154-
// return BigNumber(0);
155-
// }
156-
// const { gasToken } = feeProps.gasConfig;
157-
// const token = selectedAsset.asset.address;
158-
159-
// const displayGas = getDisplayGasFee(
160-
// feeProps.gasConfig,
161-
// chainAssetsMap.data || {}
162-
// );
163-
// const amount =
164-
// token === gasToken ?
165-
// selectedAsset.amount.minus(displayGas.totalDisplayAmount)
166-
// : selectedAsset.amount;
167-
168-
// return amount;
169-
// }, [selectedAsset?.asset.address]);
170-
171-
// const maxMaspTxAmountAtom = useMemo(() => {
172-
// let props: MaxMaspTxAmountProps | null;
173-
// if (!account || !destinationAddress || !selectedAsset) {
174-
// props = null;
175-
// } else {
176-
// props = {
177-
// maxNotes: 6,
178-
// source: account.pseudoExtendedKey!,
179-
// target: destinationAddress,
180-
// token: selectedAsset.asset.address,
181-
// feeToken: feeProps.gasConfig.gasToken,
182-
// amount:
183-
// isNamadaAsset(selectedAsset.asset) ?
184-
// maxAmount.toString()
185-
// : toBaseAmount(selectedAsset.asset, maxAmount).toString(),
186-
// feeAmount: feeProps.gasConfig.gasPriceInMinDenom
187-
// .times(feeProps.gasConfig.gasLimit)
188-
// .toString(),
189-
// };
190-
// }
191-
192-
// return estimateMaxMaspTxAmountAtom(props);
193-
// }, [
194-
// selectedAsset?.asset.address,
195-
// feeProps.gasConfig.gasToken,
196-
// feeProps?.gasConfig.gasLimit.toString(),
197-
// account?.pseudoExtendedKey,
198-
// destinationAddress,
199-
// ]);
200-
201-
// const maxMaspTxAmountQuery = useAtomValue(maxMaspTxAmountAtom);
202152
const maxMaspTxAmountQuery = useAtomValue(
203153
estimateMaxMaspTxAmountAtom2({
204154
token: selectedAsset?.asset.address,

apps/namadillo/src/atoms/balance/atoms.ts

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { DefaultApi } from "@namada/indexer-client";
2-
import { MaxMaspTxAmountProps } from "@namada/sdk-multicore";
32
import { Account, AccountType, DatedViewingKey } from "@namada/types";
43
import {
54
accountsAtom,
@@ -25,8 +24,8 @@ import { sequenceT } from "fp-ts/lib/Apply";
2524
import { pipe } from "fp-ts/lib/function";
2625
import * as O from "fp-ts/Option";
2726
import invariant from "invariant";
28-
import { Atom, atom, getDefaultStore } from "jotai";
29-
import { atomWithQuery, AtomWithQueryResult } from "jotai-tanstack-query";
27+
import { atom, getDefaultStore } from "jotai";
28+
import { atomWithQuery } from "jotai-tanstack-query";
3029
import { atomFamily, atomWithStorage } from "jotai/utils";
3130
import { Address, TokenBalance } from "types";
3231
import { namadaAsset, toDisplayAmount } from "utils";
@@ -35,7 +34,6 @@ import {
3534
mapNamadaAssetsToTokenBalances,
3635
} from "./functions";
3736
import {
38-
estiamteMaxMaspTxAmountByNotes,
3937
fetchShieldedBalance,
4038
fetchShieldedRewards,
4139
fetchShieldedRewardsPerToken,
@@ -205,26 +203,6 @@ export const shieldedBalanceAtom = atomWithQuery((get) => {
205203
};
206204
});
207205

208-
export const estimateMaxMaspTxAmountAtom = (
209-
props: MaxMaspTxAmountProps | null
210-
): Atom<AtomWithQueryResult<[string, string] | null>> =>
211-
atomWithQuery((get) => {
212-
const chainParametersQuery = get(chainParametersAtom);
213-
const chainId = chainParametersQuery.data?.chainId;
214-
215-
return {
216-
queryKey: ["estimate-max-masp-tx-amount", chainId],
217-
...queryDependentFn(async () => {
218-
if (!props || !chainId) {
219-
return null;
220-
}
221-
222-
const result = await estiamteMaxMaspTxAmountByNotes(props, chainId);
223-
return result;
224-
}, [chainParametersQuery]),
225-
};
226-
});
227-
228206
export const getNotesAndConversionsAtom = atomWithQuery((get) => {
229207
const viewingKeysQuery = get(viewingKeysAtom);
230208
const chainParametersQuery = get(chainParametersAtom);

apps/namadillo/src/atoms/balance/services.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import * as Comlink from "comlink";
33
import {
44
Balance,
55
DatedViewingKey,
6-
MaxMaspTxAmountProps,
76
ProgressBarNames,
87
SdkEvents,
98
} from "@namada/sdk-multicore";
@@ -106,15 +105,6 @@ export const fetchShieldedBalance = async (
106105
return await sdk.rpc.queryBalance(viewingKey.key, addresses, chainId);
107106
};
108107

109-
//TODO: typo
110-
export const estiamteMaxMaspTxAmountByNotes = async (
111-
props: MaxMaspTxAmountProps,
112-
chainId: string
113-
): Promise<[string, string]> => {
114-
const sdk = await getSdkInstance();
115-
return await sdk.tx.estiamteMaxMaspTxAmountByNotes(props, chainId);
116-
};
117-
118108
export const getNotesAndConversions = async (
119109
viewingKey: string,
120110
chainId: string

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3854,7 +3854,7 @@ __metadata:
38543854

38553855
"@namada/sdk-multicore@file:.yalc/@namada/sdk-multicore::locator=%40namada%2Fnamadillo%40workspace%3Aapps%2Fnamadillo":
38563856
version: 0.20.7
3857-
resolution: "@namada/sdk-multicore@file:.yalc/@namada/sdk-multicore#.yalc/@namada/sdk-multicore::hash=e75f87&locator=%40namada%2Fnamadillo%40workspace%3Aapps%2Fnamadillo"
3857+
resolution: "@namada/sdk-multicore@file:.yalc/@namada/sdk-multicore#.yalc/@namada/sdk-multicore::hash=78b5c9&locator=%40namada%2Fnamadillo%40workspace%3Aapps%2Fnamadillo"
38583858
dependencies:
38593859
"@cosmjs/encoding": "npm:^0.29.0"
38603860
"@dao-xyz/borsh": "npm:^5.1.5"
@@ -3865,7 +3865,7 @@ __metadata:
38653865
buffer: "npm:^6.0.3"
38663866
semver: "npm:^7.7.2"
38673867
slip44: "npm:^3.0.18"
3868-
checksum: 10c0/df8c05eed95e21a1c2039d29ae79fd47957e0ebd79f76fb504fb03089f657a8913da8f9e873cd0ddc47ad30ec67dc073319ecada0b563a988e9ae695eb28c368
3868+
checksum: 10c0/0f967f92dfc85c2cae4424b1b93a0571ec592df388a339eabc9033e7e5eb670717ff496c32e505543923b7240d36c3baf98e03b9038785a2c8c4874c4885a2a8
38693869
languageName: node
38703870
linkType: hard
38713871

0 commit comments

Comments
 (0)