-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* [ENG-3199] feat: Make UI for RBF in web-extension * Add a display condition for Accelerate tx button * Add `Speed up transaction` modal * Add custom toast styling for `success` option * Add ledger tx confirmation modal for the RBF * Update the ledger UI for RBF and Speed up button icon * Transform the Speed up modal into a separate screen * Add toaster bottom indent back * Update the speed up tx page with new buttons * Add the custom fee modal to the tx speed up * Improve speed up tx UI * Add `Insufficient funds` warning text and disable the speed up option, update the `xverse-core` version * Add rbf recommended fees fetching * Improve the tx speed up logic * Improve the tx speed up logic * Add `useTransaction` hook and tx speed up submit * Fix accountType and fee buttons order * Fix accountType assignment * Refactor fee rate calculation * Remove unused imports * Change the numbers displaying logic on the speed up tx screen * Convert the `estimatedCompletionTime` var into a function * Update the speed up tx option info alignment * Fix accountId property * Add rbf tx broadcasting * Update @secretkeylabs/xverse-core version * Move the ledger confirmation UI to the speed up tx screen * Update the ledger confirmation logic for rbf * Update handleBackButtonClick to handleGoBack * Remove the unused imports * Update the rbf custom fee logic * Add the total fee calculation for the custom fee using `getRbfFeeSummary` func * Move speed up tx screen styles to a separate file * Fix the custom total fee calculation * Improve the custom fee calculation * Improve the custom fee calculation * Add `isTransactionRbfEnabled` check * Update the xverse-core version * Update the xverse-core version * Hide rbf for brc20, add estimated time for the custom fee * Update the xverse-core version * Remove console logs and add err catching on broadcasting * Update the xverse-core version * chore: fix type errors after ActionButton interface change * Update the `isTransactionRbfEnabled` func usage and xverse-core version * Update the xverse-core version * Update the useEffect calling the `fetchRbfData` func * Make some code fixes according to PR comments * Update the import from xverse-core and the version * Update the useEffect deps * Fix the custom fee logic * Use new RBF core logic * use mempool api * fix merge issue * update core * chore: comment breaking changes * Improve the custom fee logic * Don't show speed up if disabled in settings * Update core version * Add key to groupedTxs * Temp fix for multiple transactions appearing after RBF * Navigate directly to homepage instead of relative history count * fix: include xverse-core with rbf fixes * chore: bump core version to include chain rbf fixes * fix: update missing btcClients in rbf screens --------- Co-authored-by: Tim Man <tim@secretkeylabs.com> Co-authored-by: victorkirov <victor.kirov@gmail.com> Co-authored-by: fede erbes <fedeerbes@gmail.com> Co-authored-by: jordankzf <jordan@secretkeylabs.com>
- Loading branch information
1 parent
0188b2c
commit eed2090
Showing
25 changed files
with
1,150 additions
and
57 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
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
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,29 @@ | ||
import useBtcClient from '@hooks/useBtcClient'; | ||
import useWalletSelector from '@hooks/useWalletSelector'; | ||
import { fetchBtcTransaction } from '@secretkeylabs/xverse-core'; | ||
import { useQuery } from '@tanstack/react-query'; | ||
|
||
export default function useTransaction(id: string) { | ||
const { selectedAccount } = useWalletSelector(); | ||
const btcClient = useBtcClient(); | ||
|
||
const fetchTransaction = async () => { | ||
if (!selectedAccount || !id) { | ||
return; | ||
} | ||
|
||
const transaction = await fetchBtcTransaction( | ||
id, | ||
selectedAccount.btcAddress, | ||
selectedAccount.ordinalsAddress, | ||
btcClient, | ||
); | ||
|
||
return transaction; | ||
}; | ||
|
||
return useQuery({ | ||
queryKey: ['transaction', id], | ||
queryFn: fetchTransaction, | ||
}); | ||
} |
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
Oops, something went wrong.