-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new method to the `ITBTC` interface that requests redemption. The implementation of this interface uses the `requestRedemption` fn from `tbtc-v2.ts` lib. As a temporary soultion here we hardcode the redemption request data in component- once we merge the #532 we will pass these params via props to the component.
- Loading branch information
1 parent
40d4a30
commit 8512568
Showing
4 changed files
with
118 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { useThreshold } from "../../contexts/ThresholdContext" | ||
import { | ||
OnErrorCallback, | ||
OnSuccessCallback, | ||
useSendTransactionFromFn, | ||
} from "../../web3/hooks" | ||
|
||
export const useRequestRedemption = ( | ||
onSuccess?: OnSuccessCallback, | ||
onError?: OnErrorCallback | ||
) => { | ||
const threshold = useThreshold() | ||
|
||
return useSendTransactionFromFn( | ||
threshold.tbtc.requestRedemption, | ||
onSuccess, | ||
onError | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters