-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ledger Live App #655
Ledger Live App #655
Commits on Oct 31, 2023
-
Create
useEmbedFeatureFlag
hookThis hook will check if there is an `isEmbed` query param in the page url. If it is, then it will save that value in local storage. We will use that param in our manifest.json file for our Ledger Live App.
Configuration menu - View commit details
-
Copy full SHA for e476476 - Browse repository at this point
Copy the full SHA e476476View commit details -
Make only tBTC section available
For Ledger Live App we only need tBTC page.
Configuration menu - View commit details
-
Copy full SHA for a69c707 - Browse repository at this point
Copy the full SHA a69c707View commit details -
Since we only have tbtc section in our Ledger Live App the Sidebar is not needed, so we hide it if the `isEmbed` flag is set to true.
Configuration menu - View commit details
-
Copy full SHA for 5155964 - Browse repository at this point
Copy the full SHA 5155964View commit details
Commits on Nov 1, 2023
-
Create LedgerLiveAppManager class
The `LedgerLiveAppManager` will be a core for all the logic used in the LedgerLive app. It will contain two separate managers for ethereum and bitcoin transactions. For ethereum manager we also have to create a separate LedgerLiveApp signer that implements Signer class from Ethers. It is needed so that we can pass it to our new tbtc-v2 SDK and use it to sign transactions and communicatin with the contracts. This way we won't have to change anything in the SDK just for the LedgerLive implementation and we keep it clean. In this commit only ethereum manager is created. In the future we should also create bitcoinManager and put it here, which allow the user to send bitcoins to a specific bitcoin address.
Configuration menu - View commit details
-
Copy full SHA for a7f76ed - Browse repository at this point
Copy the full SHA a7f76edView commit details -
Put ledgerLiveAppManager inside threshold-ts lib
The Threshold Ledger Live App will show only tbtc flow so it makes sense to put the `ledgerLiveAppManager` inside our `threshold-ts` lib in `TBTC` class. Besides, we will use the signer from that class and pass it to our tbtc-v2 SDK.
Configuration menu - View commit details
-
Copy full SHA for 8b066bb - Browse repository at this point
Copy the full SHA 8b066bbView commit details -
Add possibility to connect ledger ethereum account
As of now it will only allow to use goerli accounts. Left TODOs around the places to not forget to fix that. I've created `useRequestEthereumAccount` which actually works similar to `useRequestAccount` from `@ledgerhq/wallet-api-client-react`, but it uses our ledgerLiveManager under the hood. This way it will save the account in our signer, which then will be used in our tbtc-v2 SDK to interact with contracts. Since we save our connected address in redux store we will now display it when the address is connected instead of getting the `account` property from `useWeb3React` hook.
Configuration menu - View commit details
-
Copy full SHA for e9645da - Browse repository at this point
Copy the full SHA e9645daView commit details -
Fix minting flow not siplaying for connected users
Minting flow was not displaying for connected users in Ledger Live app. I've fixed it by checking if the address is present in redux store. Since we save it for normal wallets and also for wallets in ledger live app, it will work for both.
Configuration menu - View commit details
-
Copy full SHA for 8bcd830 - Browse repository at this point
Copy the full SHA 8bcd830View commit details -
Assign eth address from the store to the form
Assign eth address from the redux store to the provide data form. It will be an address that will be used to generate deposit address.
Configuration menu - View commit details
-
Copy full SHA for b6c1814 - Browse repository at this point
Copy the full SHA b6c1814View commit details -
Make
account
property private in ledger signerWe don't want to allow the account to be changed outside of the ledgerLive etherumManager so we are making the `account` property inside `LedgerLiveEthereum` signer private. The account should be changed by using `connectAccount` method in our manager.
Configuration menu - View commit details
-
Copy full SHA for f13fb80 - Browse repository at this point
Copy the full SHA f13fb80View commit details -
Create LedgerLiveAppBitcoinManager
This class will manage all bitcoin transactions/message signing inside the Ledger Live app. Besides I've also renamed `EthereumManager` to `LedgerLiveAppEthereumManager` to make it more specific.
Configuration menu - View commit details
-
Copy full SHA for 4f8266f - Browse repository at this point
Copy the full SHA 4f8266fView commit details -
Change name for
LedgerLiveEthereumSigner
class`LedgerLiveEthereumSigner` -> `LedgerLiveAppEthereumSigner`
Configuration menu - View commit details
-
Copy full SHA for b059feb - Browse repository at this point
Copy the full SHA b059febView commit details -
Make two separate hooks for bitcoin and ethereum
Makes two separate requestAccount hook for bitcoin and for ethereum networks.
Configuration menu - View commit details
-
Copy full SHA for 62d0f96 - Browse repository at this point
Copy the full SHA 62d0f96View commit details -
Make it possible to connect bitcoin account
We want to connect bitcoin account at step 2 of the minting flow. For this case I've created a separate button that allows the user to connect a bitcoin account inside ledger live app. After that he will be able to send the bitcoins form the account he had choosen to a deposit address that he just generated.
Configuration menu - View commit details
-
Copy full SHA for 100b0c6 - Browse repository at this point
Copy the full SHA 100b0c6View commit details
Commits on Nov 2, 2023
-
Rewamp (1) - install wallet-connect-client-react
I've decided to rewamp the whole implementation as it seems that we don't really need to keep everything in ledgerLiveAppManager. The idea now is to keep only LedgerLiveAppEthereumSigner (which in the future will be placed in tbtc-v2 SDK) for integrating with contracts, and create a context for ledger live app where we will keep connected ethereum and bitcoin addresses. The LedgerLiveAppEthereumSigner will use `@ledgerhq/wallet-api-client` package, and for the rest things (connecting ethereum wallet, connecting bitcoin wallet, sending bitcoins to address), we will use `wallet-connect-client-react` lib. The first step is to install the `wallet-connect-client-react`
Configuration menu - View commit details
-
Copy full SHA for dad6a2e - Browse repository at this point
Copy the full SHA dad6a2eView commit details -
Rewamp (2) - TransportProvider
Adds TransportProvider needed for `wallet-api-client-react`. This will allow us to use the hooks from the libs (like `useRequestAccount` etc.).
Configuration menu - View commit details
-
Copy full SHA for b222469 - Browse repository at this point
Copy the full SHA b222469View commit details -
Rewamp (3) - LedgerLiveAppContext
This context is where we will store our eth and btc addresses for ledger live app. Why we need it? We have to detect when the address is changed in our LedgerLiveApp and then update our signer inside threshold lib in `ThresholdContext`. For website we could just detect it with our `useWeb3React` hook, but in this case it is not that simple. The only way in the previous implementation was to get the actual address from the redux store, but this required to move `<ReduxProvider>` above the `<ThresholdProvider`, which might broke the app in some places. That's why I've decided to create a separate context foe Ledger Live App and keep all data about connected accounts there. We will put the context above `ThresholdContext` so we can use it there and later we will make sure to save the account there each time we use `useRequestAccount` hook from `wallet-api-client-react`.
Configuration menu - View commit details
-
Copy full SHA for edf9afd - Browse repository at this point
Copy the full SHA edf9afdView commit details -
Rewamp (4) - use ledger's wallet api for react
This is probably final step (or one of the final steps) in this rewamp. There are few bigger changes in this commit: 1. Remove `LedgerLiveAppManager` completely We won't need that class anymore. The only thing we need is `LedgerLiveAppEthereumSigner` to interact with eth contracts. The rest thigns (like connecting wallets, and sending bitcoins) will be handled with hooks from ledger's wallet-api for react. 2. Store `LedgerLiveAppEthereumSigner` instance in our `TBTC` class in `thershold-ts` lib. We also remove the need to pass anything related to ledger live app through `ThresholdConfig`, like we did with `LedgerLiveAppManager`. The Ledger Live App Signer will be created inside the class if necessary. 3. Refactor `useRequestEthereumAccount` and `useRequestBitcoinAccount` Those hooks will now use `useRequestAccount` hook from `@ledgerht/wallet-api-client-react`, but additionaly the `requestAccount` method will save the bitcoin/ethereum account in the LedgerLiveContext and ethereum account in the LedgerLiveAppEthereumSigner (through TBTC method).
Configuration menu - View commit details
-
Copy full SHA for 7b5105e - Browse repository at this point
Copy the full SHA 7b5105eView commit details -
Rewamp (5) - create
useIsActive
hookThis hook will work both in website view and inside the Ledger Live App. If `isEmbed` flag is set to false it will return the values based on the `useWeb3React` hook. If it's true the returned values will be based on `LedgerLiveApp` context.
Configuration menu - View commit details
-
Copy full SHA for 46344d7 - Browse repository at this point
Copy the full SHA 46344d7View commit details -
Add the possibility to upload JSON file
For this we've added `Continue` button in Step 1 - it is visible only if the app is embed. The `useIsActive` hook is used to get the proper account base on the `isEmbed` feature flag.
Configuration menu - View commit details
-
Copy full SHA for e50f783 - Browse repository at this point
Copy the full SHA e50f783View commit details -
Refactor useEffect inside useRequestAccount hooks
For both bitcoin and ethereum hooks we can just save the account address immidietely to the LedgerLiveApp Context - we don't have to check if the address is undefined or not in the if statements like before. Additionally we can also save the eth account for the LedgerLiveAppEthereumSigner using one-liner. I've also remove saving bitcoin address to the LedgerLiveApp signer. It was a mistake. Only eth addresses should be saved there, since it is a signer for ethereum chain.
Configuration menu - View commit details
-
Copy full SHA for 7d6d897 - Browse repository at this point
Copy the full SHA 7d6d897View commit details -
Store Account object in Ledger Live App Context
I've decided to store Account object (from ledger's wallet-api) in Ledger Live App Context, instead of just account address. This will be helpful when sending a bitcoin transaction, because it need the account id, that is stored in Account object.
Configuration menu - View commit details
-
Copy full SHA for ad0c843 - Browse repository at this point
Copy the full SHA ad0c843View commit details
Commits on Nov 3, 2023
-
Allow sending bitcoins to deposit address
Creates `useSendBitcoinTransaction` hook that use `useSignAndBroadcast` hook from `ledgerhq/wallet-api-client-react` under the hood. This will send a specific amount of bitcoins to a specific address.
Configuration menu - View commit details
-
Copy full SHA for 95acc74 - Browse repository at this point
Copy the full SHA 95acc74View commit details -
Add
bignumber.js
to package.jsonUnfortunately we need `bignumber.js` library in our dApp to work with ledger's wallet-api. Unfortunately, because we already use `BigNumber` lib from `ethers` for our calcuulations. The commit changes only `package.json` because `yarn.lock` already contains `bignumber.js` registry, since it's a dependency of wallet-api.
Configuration menu - View commit details
-
Copy full SHA for efe582f - Browse repository at this point
Copy the full SHA efe582fView commit details -
Change Signer class that LedgerSigner extends from
Extending `LedgerLiveAppEthereumSigner` from `Signer` class from `ethers` lib did not work as expected when passing it to tbtc-v2 SDK. The SDK did not recognize that it was an instance of Signer. What works is changing the way we import `Signer` class - instead of doing it from `ethers` we now do it from `@ethersproject/abstract-signer`.
Configuration menu - View commit details
-
Copy full SHA for 5d4be01 - Browse repository at this point
Copy the full SHA 5d4be01View commit details -
Pass ledgerLiveAppEhereumSigner to Threshold lib
I've decided to add additional property to thresholdConfig.ethereum: `ledgerLiveAppEthereumSigner`. This will allow us to pass the signer when creating a new instance of TBTC. It will be useful when connecting account. Our threshold library reinitializes all classed inside and we don't want to lose the data from our signer (especcially the connected address that we store there). That's why we pass an old signer from therhols lib to `updateConfig` method when we connect an account.
Configuration menu - View commit details
-
Copy full SHA for 4051270 - Browse repository at this point
Copy the full SHA 4051270View commit details -
Install tbtc-v2.ts SDK as a separate package
Since the version 2 of `tbtc-v2.ts` lib is not implemented in our dApp yet, I've decided to install it as a separate package for now. This way it will be easier to change things, once the integration is ready.
Configuration menu - View commit details
-
Copy full SHA for 3f5d279 - Browse repository at this point
Copy the full SHA 3f5d279View commit details
Commits on Nov 6, 2023
-
Implement minting flow with SDK v2
Implements whole minting process with tbtc-v2.ts SDK (v2). The implement process is being implemented in a separate PR, so this is a quick implementation to make the whole process easier once the implementation PR is merged (and to make sure it will work with new SDK). For this, I've created a separate methods in our `TBTC` class (in `threshold-ts` lib) and I've added `SdkV2` at the end, so it will be easier to determinate which method is related to the new SDK. It will also be easier to integrate the changes once the SDK implementation PR is done (I hope :D). For example now, in `TBTC` class we have two methods: - `calculateDepositAddress` - which uses old tbtc-v2.ts version - `calculateDepositAddressSdkV2` - which uses new tbtc-v2.ts version. All the minting flow is using `SdkV2` methods now.
Configuration menu - View commit details
-
Copy full SHA for 168aaed - Browse repository at this point
Copy the full SHA 168aaedView commit details -
Implement Resume Deposit with SDK v2
Implements resuming deposit (from file) with SDK v2. For that we have to create deposit receipt from the values that we store in the file. Since those values are in plain text we have to change them to `Hex` objects (except `depositor`). Then, we initiate deposit object from receipt and calculate the correct btc deposit address.
Configuration menu - View commit details
-
Copy full SHA for a35eeaf - Browse repository at this point
Copy the full SHA a35eeafView commit details -
Implement reveal deposit for ledger live app
Implements reveal deposit functionalityin ledger live app. For this we create a separate `useSendLedgerLiveAppTransactionFromFn` hook, that is a copy of `useSendTransactionFromFn`, but changed in a way to work with our LedgerLiveApp Signer. We then check which hook should we use inside `useRevealDepositTrnasaction`, based on the `isEmbed` flag. We are also adding `await` to `sendTransaction` method in `LedgerLiveAppEthereumSigner`, because we need to return that transaction response (not promise) from that function.
Configuration menu - View commit details
-
Copy full SHA for ef13ab8 - Browse repository at this point
Copy the full SHA ef13ab8View commit details -
Fix fetching Bridge Activity in Ledger Live App
The fetching was not working in Ledger Live App, because it used the account from `useWeb3React` hook, which doesn't work here. I've replaced it with `useIsActive` hook, which returns either web3 account or connected ledger account based on `isEmbed` flag. The bridge activity still uses the old version of tbtc-v2.ts, but I don't think it's necessary to fix that in this PR. The main reason to use a new SDK in this PR is to see if the LedgerLiveAppEthereumSigner will work properly with it.
Configuration menu - View commit details
-
Copy full SHA for 39e589c - Browse repository at this point
Copy the full SHA 39e589cView commit details -
There was an error when doing a reveal that displayed `no ongoingReques: <request_id>`. It was happening because we were using a separate transport object in our LedgerLiveAppEthereumSigner, and a separate one for our react hooks. The one in our react hook was always connected and we didn't disconnect it after doing a transaction. This way, when we used our LedgerLiveApp Signer we had two transport objects connected, and two returned the same message, but the second time the message was already cleared. As a workaround we will save the transport object that we use in react in a separate context and we connect it only before doing a transaction, and disconnect it right after.
Configuration menu - View commit details
-
Copy full SHA for 234fda3 - Browse repository at this point
Copy the full SHA 234fda3View commit details -
Fix minting success page redirect
There was a bug when, after doing a reveal, the use was not redirected to minting success page. It happened, because the transaction receipt, that we were getting with `provider.getTransactionReceipt(txHash)` method in `useSendLedgerLiveAppTransactionFromFn`, was not found (because it was not mined yet). I've implemented a fix based on our `useSendTransactionFromFn` hook. We are now getting a `TransactionResponse` object using `provider.getTransaction(txHash)` method and the wait for the transaction to be mined with `.wait()` method. This method will return a `TransactionReceipt` object once the transaction is mined.
Configuration menu - View commit details
-
Copy full SHA for 46afb9b - Browse repository at this point
Copy the full SHA 46afb9bView commit details
Commits on Nov 7, 2023
-
Disconnect transport when requesting eth account
The walletApiTransport was not disconnected properly after requesting and eth account in `useRequestEthereumAccount()` hook. This leads to `no ongoingRequest` error when doing a contract transaction that uses `wallet-api-client`. I've actually used `connect()` instead of `disconnect()` by mistake. For more context please see 234fda3.
Configuration menu - View commit details
-
Copy full SHA for d04a69a - Browse repository at this point
Copy the full SHA d04a69aView commit details -
Handle async SDK initialization
The SDK in our Threshold lib is initialized asynchronously - the `_handleSdkInitialization` method returns a Promise. We need to know whenever the SDK is initializing or not, becuase ther might be a situation when we want to call a function and the SDK is in the middle of initializing. Such case happens right now for `findUtxoEffect`, after disconnecting and reconnecting the wallet at step 2 of the minting flow. The deposit data is updated in the store which triggers the `findUtxo` effect, but it can find any UTXOs, because `deposit` object is not yet initialized and the SDK is in the middle of initializing with a new signer. Becuase of that I've decided to make `_handleSdkInitialization` method public and rename it to `initializeSdk`. We thenn put it in `useInitializeSdk` hook where we can use state to indicate if the sdk is initializing or not. We also check if the SDK is initialized with signer or not - this will allow us to wait with data fetch until the we know the signer is initialized with signer. Finally, we call the `initiateSdk` method in our `ThresholdContext` and save the state data (`isSdkInitializing` and `isSdkInitializedWithSigner`) in our context. Now we only need to initialize `deposit` object in our `findUtxo` effect. We just check there if `deposit` is defined, and if it's not, we are taking the data from the redux store and use it to initialize deposit object, befor we call `findAllUnspentTransactionOutputsSdkV2` method.
Configuration menu - View commit details
-
Copy full SHA for 947c8a5 - Browse repository at this point
Copy the full SHA 947c8a5View commit details -
Fix fetching token amount in Ledger Live App
For the tbtc balance to fetch property (in Ledger Live App) we have to use the `useIsActive` hook to get the account based on the `isEmbed` flag. This will return Leger Live App connected account, if the app is run in Ledger Live, or web3 account, if the app is run on the browser.
Configuration menu - View commit details
-
Copy full SHA for 7b86fba - Browse repository at this point
Copy the full SHA 7b86fbaView commit details -
Fix Connect Wallet submit button for Ledger Live
Fixes `Connect Wallet` submit button (that shows up instead of a real submit button when wallet is not connected). The button did open selectWallet modal in LedgerLive app, when in this case it should request the account.
Configuration menu - View commit details
-
Copy full SHA for 9a44303 - Browse repository at this point
Copy the full SHA 9a44303View commit details -
Return prefixed tx hash when revealing a deposit
I've noticed that we should actually return an already prefixed tx hash from the method in our TBTC class. This way we don't have to add prefix in `useSendLedgerLiveAppTransactionFromFn` hook.
Configuration menu - View commit details
-
Copy full SHA for efef52d - Browse repository at this point
Copy the full SHA efef52dView commit details -
Implement unminting flow with SDK v1
Note: This flow will work only with the newest version of tbtc-v2.ts that is not yet released. Once it is I will update the version in a separate commit. Implements whole unminting process with tbtc-v2.ts SDK (v2). The unminting process is being implemented in a separate PR, so this is a quick implementation to make the whole process easier once the implementation PR is merged (and to make sure it will work with new SDK). For this, I've created a separate method in our `TBTC` class: `requestRedemptionSdkV2`, which is then used in `useRquestRedemption` hook.
Configuration menu - View commit details
-
Copy full SHA for 1fe279f - Browse repository at this point
Copy the full SHA 1fe279fView commit details -
Fix building a redemption link
After requesting a redemption the error appears, because we used address from `useWeb3React` hook to build redemption details account. The error also appeard after connecting the account, when we have unmint in our Bridge Activity. This commit fixes that. It uses account from `useIsActive` hook instead of the one from `useWeb3React` hook.
Configuration menu - View commit details
-
Copy full SHA for ff28f60 - Browse repository at this point
Copy the full SHA ff28f60View commit details -
Add manifest.json file for Ledger Live App
Adds manifest.json file to the repository. It is a config file that allows external applications and dApps to be integrated inside the Ledger Live software as a Live app and interact with all provided features.
Configuration menu - View commit details
-
Copy full SHA for ae7804d - Browse repository at this point
Copy the full SHA ae7804dView commit details
Commits on Nov 8, 2023
-
Display Continue mint button only for Live App
We should display Continue Mint button in Step 1 of the minting flow only when the `isEmbed` flag is set to true (which means that only if our dApp is run inside Ledger Live as Live App.
Configuration menu - View commit details
-
Copy full SHA for fb0c3a2 - Browse repository at this point
Copy the full SHA fb0c3a2View commit details -
Add a posisbility to send exact amount of BTC
Adds an input form that allows the user to enter bitcoin amount that he wants to send to the deposit address. It will only show when `isEmbed` flag is set to true. There were some additional changes required to make it possible. First of all, I've adedd additional parameter to `TokenBalanceInputProps` - `tokenDecimals`. This way it will be possible to pass that parameter to `TokenBalanceInput` component through `FormikTokenBalanceInput` component, and it will allow to specify the input for the token we want to use. For example, without that, whenever we put the amount in `FormikTokenBalanceInput`, it will automatically convert that to wei (amount*10^18), which means that we can't use it with bitcoin, that has only 8 decimal places. After the change, we can pass `tokenDecimals = 8`, to make the `FormikTokenBalanceInput` working for bitcoin amounts. Second of all, there were some changes needed in `stc/utils/forms`, espcially with the `defaultGreaterThanMsg` and `defaultLessThanMsg`. The form uses `formatTokenAmount` which also worked with default 18 decimals and 2 precision. This means, that when we've put a value that is greater than our bitcoin balance (let's say our btc balance is 0.66666), it would siplay an error: The value should be less than or equal `~0.67` + it would break the app. To fix that we have to pass 8 decimals nad 8 precision there.
Configuration menu - View commit details
-
Copy full SHA for 15617dd - Browse repository at this point
Copy the full SHA 15617ddView commit details -
Improve data loading after connecting account
This improves data loading with SDK v2 when we connect a wallet. Right now the problem is that when we've genrated a deposit address (so we are at step 2 of the minting flow), then refresh the page and then connect again, the page will show step 1 (provide data) for a second before displaying loading state and then step 2 (when we finished before we refreshed a page). This commit fixes that, and it won't show step 1 in such case. Still, there is small issue, because before SDK v2, the data was laoded just after connecting an account and now you have to wait ~1sec for it to start loading (due to sdk async initialization). I will attempt to fix that in future commits.
Configuration menu - View commit details
-
Copy full SHA for 4d6d4e1 - Browse repository at this point
Copy the full SHA 4d6d4e1View commit details
Commits on Nov 9, 2023
-
Trigger loading state for step 2 ASAP
When the user had deposit data in local storage and connects the wallet, there was like ~1 seconds delay before it showed the loading state of the mintin step. With old tbtc-v2.ts version it started loading as soon as user connected the wallet. This commit fixes that for SDK v2. I've also described this issue in the previous commit: `4d6d4e185d16750db687a1dfe6b94b37a3f8e2f0`.
Configuration menu - View commit details
-
Copy full SHA for fa1aad0 - Browse repository at this point
Copy the full SHA fa1aad0View commit details
Commits on Nov 22, 2023
-
Configuration menu - View commit details
-
Copy full SHA for bf3c3e3 - Browse repository at this point
Copy the full SHA bf3c3e3View commit details
Commits on Nov 23, 2023
-
Improve passing Ledger Live signer to threshold-ts
The LedgerLiveAppEthereumSigner is now passed in `providerOrSigner` property of the `EthereumConfig` type. When the user is not connected we will use the default threshold lib provider, and when he conects the wallet we will pass the signer through ThresholdContext's useEffect (as `providerOrSigner` prop). The signer will also be stored in `LedgerLiveAppContext` so that we can update it's account in the dApp, and we will be sure we use the same instance of it.
Configuration menu - View commit details
-
Copy full SHA for bfffe4f - Browse repository at this point
Copy the full SHA bfffe4fView commit details -
useContext(LedgerLiveAppContext) -> useLedgerLiveApp() useContext(WalletApiReactTransportContext) -> useWalletApiReactTransport()
Configuration menu - View commit details
-
Copy full SHA for c0db65b - Browse repository at this point
Copy the full SHA c0db65bView commit details
Commits on Nov 27, 2023
-
Use ledger live app signer from tbtc-v2.ts
Removes `ledger-live-app-eth-signer` folder and imports the ledger live app signer from `tbtc-v2.ts` lib instead.
Configuration menu - View commit details
-
Copy full SHA for ceec2f1 - Browse repository at this point
Copy the full SHA ceec2f1View commit details -
Fix disconnecting account for ledger live app
fetchTvl() function did not work properly in LedgerLiveApp, when we diconnected an account. It happened, because the ledger live signer account was set to undefined and it used it as `provideOrSigner` instead of default threshold lib provider (`fetchTvl()` happened before the threshold lib was reinitialized after account disconnected). This commit fixed that.
Configuration menu - View commit details
-
Copy full SHA for bf790b6 - Browse repository at this point
Copy the full SHA bf790b6View commit details -
Improve
useInitializeTbtcSdk
hookMoves `setIsInitializing(false)` line at the very end, so that it properly indicated that the initialization wass completed and the resty of the parameters, like `isInitialized` and `setIsInitializedWithSigner`, are set.
Configuration menu - View commit details
-
Copy full SHA for b91165a - Browse repository at this point
Copy the full SHA b91165aView commit details -
Fix unmint page throwing error
The unmint page was not loaded properly when we connect the account. It happened because fo the mistake in 4d6d4e1. The `<Outlet>` should be displayed when sdk is NOT initialing anymore, not when it's initializing.
Configuration menu - View commit details
-
Copy full SHA for ac67427 - Browse repository at this point
Copy the full SHA ac67427View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1749ac5 - Browse repository at this point
Copy the full SHA 1749ac5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1de4b84 - Browse repository at this point
Copy the full SHA 1de4b84View commit details -
We have to check if the providerOrSigner from threshold lib is an instance of `LedgerLiveEthereumSigner`. If yes then we won't call `getProviderOrSigner` method.
Configuration menu - View commit details
-
Copy full SHA for df20497 - Browse repository at this point
Copy the full SHA df20497View commit details -
Fix tbtc balance not displaying in Ledger Live App
The balance was displayed only when `active` property from `useWeb3React` hook was set to true, which was wrong, because it should use `isActive` property from `useIsActive` hook.
Configuration menu - View commit details
-
Copy full SHA for d8c4335 - Browse repository at this point
Copy the full SHA d8c4335View commit details
Commits on Nov 28, 2023
-
Remove
useSendLedgerLiveAppTransactionFromFn
The `useSendLedgerLiveAppTransactionFromFn` hook is very similar to `useSendTransactionFromFn` hook so I think it would be best to keep it all in one hook to avoid code duplication.
Configuration menu - View commit details
-
Copy full SHA for e3bcd82 - Browse repository at this point
Copy the full SHA e3bcd82View commit details -
Rename
useEmbedFeatureFlag
hook`useEmbedFeatureFlag` -> `useIsEmbed`
Configuration menu - View commit details
-
Copy full SHA for e0ade29 - Browse repository at this point
Copy the full SHA e0ade29View commit details
Commits on Dec 8, 2023
-
Configuration menu - View commit details
-
Copy full SHA for a65ca81 - Browse repository at this point
Copy the full SHA a65ca81View commit details -
Configuration menu - View commit details
-
Copy full SHA for 03fc8c4 - Browse repository at this point
Copy the full SHA 03fc8c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for af42575 - Browse repository at this point
Copy the full SHA af42575View commit details -
Configuration menu - View commit details
-
Copy full SHA for f65103a - Browse repository at this point
Copy the full SHA f65103aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1958cfa - Browse repository at this point
Copy the full SHA 1958cfaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 683115e - Browse repository at this point
Copy the full SHA 683115eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 84a6bf7 - Browse repository at this point
Copy the full SHA 84a6bf7View commit details
Commits on Dec 13, 2023
-
Detect properly if application is embed
To this point we detected if the application is embed in Ledger Live App by checking if it had `?embed=true` query parameter in the url and then saving it it local storage. It was problematic because the query parameter would have to be in the url only once to apply that change, so refreshing the page would not reset that state (which is good for ledger live app, but bad is someone pass that query parameter on the website - he would have to remove it manually from the local storage). To resolve this I've created `useDetectIfEmbed` hook that detects if application is Embed based on the `?embed=true` query parameter and saves that information to local storage (under `isEmbed` property). Besides that it will also set `?embed=true` query parameter for every url if the `isEmbed` property is set to true in local storage. This will persist the embed flag when the user refreshes the page unless he removes the `?embed=true` query parameter from the url. This will produce the result we desire - it will persist the embed mode for ledger live app and remove it on the website once the query parameter is not provided in the url.
Configuration menu - View commit details
-
Copy full SHA for 6903e90 - Browse repository at this point
Copy the full SHA 6903e90View commit details -
Remove embed param from "homepageUrl" in manifest
The param is needed only in "url".
Configuration menu - View commit details
-
Copy full SHA for 790c240 - Browse repository at this point
Copy the full SHA 790c240View commit details -
Configuration menu - View commit details
-
Copy full SHA for aa77615 - Browse repository at this point
Copy the full SHA aa77615View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e5ce7d - Browse repository at this point
Copy the full SHA 2e5ce7dView commit details -
Configuration menu - View commit details
-
Copy full SHA for f90bfc8 - Browse repository at this point
Copy the full SHA f90bfc8View commit details -
Remove unnecessary change in import order
Let's keep it the same as it is on `main` branch.
Configuration menu - View commit details
-
Copy full SHA for c0a6e36 - Browse repository at this point
Copy the full SHA c0a6e36View commit details -
Extract send bitcoins form to separate file
Extracts `SendBitcoinsToDepositAddressForm` to a separate file to make the `MakeDeposit` file cleaner.
Configuration menu - View commit details
-
Copy full SHA for a993ab7 - Browse repository at this point
Copy the full SHA a993ab7View commit details