Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions features/create-vault/create-vault-form/use-create-vault.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const useCreateVault = () => {
value,
};

const success = await withSuccess(
const result = await withSuccess(
sendTX({
transactions: [tx],
mainActionCompleteText: vaultTexts.actions.createVault.completed,
Expand All @@ -57,13 +57,15 @@ export const useCreateVault = () => {
}),
);

trackEvent(
...MATOMO_CLICK_EVENTS[
MATOMO_CLICK_EVENTS_TYPES.finalisingCreatingVault
],
);
if (result.success) {
trackEvent(
...MATOMO_CLICK_EVENTS[
MATOMO_CLICK_EVENTS_TYPES.finalisingCreatingVault
],
);
}

return success;
return result;
},
[chainId, sendTX],
),
Expand Down
Loading