Skip to content

Commit

Permalink
clear form state on type change
Browse files Browse the repository at this point in the history
  • Loading branch information
gsteenkamp89 committed Feb 6, 2024
1 parent b05164b commit 5e0bad0
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ const emit = defineEmits<{
const newTransaction = ref<TTransaction>(cloneDeep(props.transaction));
function updateTransactionType(transactionType: TTransactionType) {
newTransaction.value.type = transactionType;
newTransaction.value = {
type: transactionType,
to: '',
value: '0',
data: '0x',
formatted: ['', 0, '0', '0x']
};
emit('updateTransaction', newTransaction.value, props.transactionIndex);
}
Expand Down

0 comments on commit 5e0bad0

Please sign in to comment.