Skip to content

Commit

Permalink
fix: do not use empty string memos by default - in transfers (#1386)
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszjasiuk authored Dec 5, 2024
1 parent 4ac59a8 commit e7fa909
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apps/namadillo/src/App/Transfer/TransferModule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const TransferModule = ({
destination.enableCustomAddress && !destination.availableWallets
);

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

const selectedAsset = mapUndefined(
(address) => source.availableAssets?.[address],
Expand Down
6 changes: 3 additions & 3 deletions apps/namadillo/src/atoms/transfer/atoms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const createShieldedTransferAtom = atomWithMutation((get) => {
params,
gasConfig,
account,
memo = "",
memo,
}: BuildTxAtomParams<ShieldedTransferMsgValue>) =>
createShieldedTransferTx(chain.data!, account, params, gasConfig, memo),
};
Expand All @@ -59,7 +59,7 @@ export const createShieldingTransferAtom = atomWithMutation((get) => {
params,
gasConfig,
account,
memo = "",
memo,
}: BuildTxAtomParams<ShieldingTransferMsgValue>) =>
createShieldingTransferTx(chain.data!, account, params, gasConfig, memo),
};
Expand All @@ -74,7 +74,7 @@ export const createUnshieldingTransferAtom = atomWithMutation((get) => {
params,
gasConfig,
account,
memo = "",
memo,
}: BuildTxAtomParams<UnshieldingTransferMsgValue>) =>
createUnshieldingTransferTx(
chain.data!,
Expand Down
8 changes: 4 additions & 4 deletions apps/namadillo/src/atoms/transfer/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const createTransparentTransferTx = async (
account: Account,
props: TransparentTransferMsgValue[],
gasConfig: GasConfig,
memo = ""
memo?: string
): Promise<TransactionPair<TransparentTransferProps> | undefined> => {
const { tx } = await getSdkInstance();
const transactionPairs = await buildTxPair(
Expand All @@ -38,7 +38,7 @@ export const createShieldedTransferTx = async (
account: Account,
props: ShieldedTransferMsgValue[],
gasConfig: GasConfig,
memo = ""
memo?: string
): Promise<TransactionPair<ShieldedTransferProps> | undefined> => {
const { tx } = await getSdkInstance();
const transactionPairs = await buildTxPair(
Expand All @@ -58,7 +58,7 @@ export const createShieldingTransferTx = async (
account: Account,
props: ShieldingTransferMsgValue[],
gasConfig: GasConfig,
memo = ""
memo?: string
): Promise<TransactionPair<ShieldingTransferProps> | undefined> => {
const { tx } = await getSdkInstance();
const transactionPairs = await buildTxPair(
Expand All @@ -78,7 +78,7 @@ export const createUnshieldingTransferTx = async (
account: Account,
props: UnshieldingTransferMsgValue[],
gasConfig: GasConfig,
memo = ""
memo?: string
): Promise<TransactionPair<UnshieldingTransferProps> | undefined> => {
const { tx } = await getSdkInstance();
const transactionPairs = await buildTxPair(
Expand Down
2 changes: 1 addition & 1 deletion apps/namadillo/src/lib/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export const createTransferDataFromNamada = (
| TransactionPair<ShieldedTransferMsgValue>
| TransactionPair<ShieldingTransferMsgValue>
| TransactionPair<UnshieldingTransferMsgValue>,
memo = ""
memo?: string
): TransferTransactionData[] => {
if (!txResponse?.encodedTxData?.txs?.length) {
throw "Invalid transaction response";
Expand Down

1 comment on commit e7fa909

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.