Skip to content

Commit

Permalink
Review some code
Browse files Browse the repository at this point in the history
  • Loading branch information
henrypalacios committed Sep 30, 2023
1 parent d3e7e8c commit c76849c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 20 deletions.
1 change: 0 additions & 1 deletion src/hooks/useDeployContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ export const useDeployContract = (): ReturnValue & {
wasm
})

debugger
const predictedStorageDeposit = decodeStorageDeposit(storageDeposit)
const tx = createInstatiateTx(
api,
Expand Down
13 changes: 0 additions & 13 deletions src/hooks/useDeployContractNew.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/infrastructure/contractDryRun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ export async function contractDryRun({
...Object.values(params)
)) as ContractInstantiateResult

debugger
if (dryRunResult?.result.isOk) return dryRunResult

const dryRunError =
Expand Down
14 changes: 9 additions & 5 deletions src/view/components/ConfirmationDialog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,26 @@ interface ConfirmationDialogProps {
open: boolean
onClose: () => void
onConfirm: () => void
message?: string
}

const TEXT_CONFIRM = 'Be sure you want to perform this action?'

function ConfirmationDialog({
open,
onClose,
onConfirm
onConfirm,
message = TEXT_CONFIRM
}: ConfirmationDialogProps) {
return (
<Dialog open={open} onClose={onClose}>
<DialogTitle>Confirmar Acción</DialogTitle>
<DialogTitle>Confirm Action</DialogTitle>
<DialogContent>
<p>Be sure you want to perform this action?</p>
<p>{message}</p>
</DialogContent>
<DialogActions>
<Button onClick={onClose}>Cancelar</Button>
<Button onClick={onConfirm}>Confirmar</Button>
<Button onClick={onClose}>Cancel</Button>
<Button onClick={onConfirm}>Confirm</Button>
</DialogActions>
</Dialog>
)
Expand Down

0 comments on commit c76849c

Please sign in to comment.