Skip to content

Commit

Permalink
add success page to ai minter
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenmarcus committed Feb 19, 2024
1 parent f459f2d commit 6bded85
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ai-minter/src/hooks/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,21 @@ export function getImageData(event: ChangeEvent<HTMLInputElement>) {
return { files, displayUrl };
}

export const callbackUrl = (
hash: string,
transactionType: TransactionSuccessEnum,
args: CallbackArgs
) =>
`${
window.location.origin
}/?signMeta=${encodeURIComponent(
JSON.stringify({
type: transactionType,
args: args,
})
)}`


export const cbUrl = (hash: string, callbackArgs: CallbackArgs) =>
callbackUrl(hash, TransactionSuccessEnum.MINT, callbackArgs)

0 comments on commit 6bded85

Please sign in to comment.