Skip to content

Commit e7fa909

Browse files
fix: do not use empty string memos by default - in transfers (#1386)
1 parent 4ac59a8 commit e7fa909

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

apps/namadillo/src/App/Transfer/TransferModule.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export const TransferModule = ({
108108
destination.enableCustomAddress && !destination.availableWallets
109109
);
110110

111-
const [memo, setMemo] = useState<undefined | string>("");
111+
const [memo, setMemo] = useState<undefined | string>();
112112

113113
const selectedAsset = mapUndefined(
114114
(address) => source.availableAssets?.[address],

apps/namadillo/src/atoms/transfer/atoms.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const createShieldedTransferAtom = atomWithMutation((get) => {
4444
params,
4545
gasConfig,
4646
account,
47-
memo = "",
47+
memo,
4848
}: BuildTxAtomParams<ShieldedTransferMsgValue>) =>
4949
createShieldedTransferTx(chain.data!, account, params, gasConfig, memo),
5050
};
@@ -59,7 +59,7 @@ export const createShieldingTransferAtom = atomWithMutation((get) => {
5959
params,
6060
gasConfig,
6161
account,
62-
memo = "",
62+
memo,
6363
}: BuildTxAtomParams<ShieldingTransferMsgValue>) =>
6464
createShieldingTransferTx(chain.data!, account, params, gasConfig, memo),
6565
};
@@ -74,7 +74,7 @@ export const createUnshieldingTransferAtom = atomWithMutation((get) => {
7474
params,
7575
gasConfig,
7676
account,
77-
memo = "",
77+
memo,
7878
}: BuildTxAtomParams<UnshieldingTransferMsgValue>) =>
7979
createUnshieldingTransferTx(
8080
chain.data!,

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const createTransparentTransferTx = async (
1818
account: Account,
1919
props: TransparentTransferMsgValue[],
2020
gasConfig: GasConfig,
21-
memo = ""
21+
memo?: string
2222
): Promise<TransactionPair<TransparentTransferProps> | undefined> => {
2323
const { tx } = await getSdkInstance();
2424
const transactionPairs = await buildTxPair(
@@ -38,7 +38,7 @@ export const createShieldedTransferTx = async (
3838
account: Account,
3939
props: ShieldedTransferMsgValue[],
4040
gasConfig: GasConfig,
41-
memo = ""
41+
memo?: string
4242
): Promise<TransactionPair<ShieldedTransferProps> | undefined> => {
4343
const { tx } = await getSdkInstance();
4444
const transactionPairs = await buildTxPair(
@@ -58,7 +58,7 @@ export const createShieldingTransferTx = async (
5858
account: Account,
5959
props: ShieldingTransferMsgValue[],
6060
gasConfig: GasConfig,
61-
memo = ""
61+
memo?: string
6262
): Promise<TransactionPair<ShieldingTransferProps> | undefined> => {
6363
const { tx } = await getSdkInstance();
6464
const transactionPairs = await buildTxPair(
@@ -78,7 +78,7 @@ export const createUnshieldingTransferTx = async (
7878
account: Account,
7979
props: UnshieldingTransferMsgValue[],
8080
gasConfig: GasConfig,
81-
memo = ""
81+
memo?: string
8282
): Promise<TransactionPair<UnshieldingTransferProps> | undefined> => {
8383
const { tx } = await getSdkInstance();
8484
const transactionPairs = await buildTxPair(

apps/namadillo/src/lib/transactions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export const createTransferDataFromNamada = (
167167
| TransactionPair<ShieldedTransferMsgValue>
168168
| TransactionPair<ShieldingTransferMsgValue>
169169
| TransactionPair<UnshieldingTransferMsgValue>,
170-
memo = ""
170+
memo?: string
171171
): TransferTransactionData[] => {
172172
if (!txResponse?.encodedTxData?.txs?.length) {
173173
throw "Invalid transaction response";

0 commit comments

Comments
 (0)