Initial Handshake Implementation#14
Conversation
|
@AcoSmrkas is attempting to deploy a commit to the rosen-bridge Team on Vercel. A member of the Team first needs to authorize it. |
| "@rosen-network/ergo": "^2.5.6", | ||
| "@rosen-network/ethereum": "^0.4.6", | ||
| "@rosen-network/evm": "^0.3.7", | ||
| "@rosen-network/handshake": "^0.1.0", |
There was a problem hiding this comment.
The version should be set to ^0.0.0
| "@rosen-ui/nautilus-wallet": "^3.1.7", | ||
| "@rosen-ui/okx-wallet": "^2.2.2", | ||
| "@rosen-ui/public-status": "^0.1.1", | ||
| "@rosen-ui/shake-wallet": "^0.1.0", |
There was a problem hiding this comment.
The version should be set to ^0.0.0
| @@ -0,0 +1,34 @@ | |||
| { | |||
| "name": "@rosen-network/handshake", | |||
| "version": "0.1.0", | |||
There was a problem hiding this comment.
The version should be set to 0.0.0
There was a problem hiding this comment.
Add the following sections:
"repository": {
"type": "git",
"url": "git+https://github.com/rosen-bridge/ui.git"
},
"engines": {
"node": ">=22.18.0",
"npm": "11.6.2"
}
Then run the following command to sort the package.json keys:
npx --yes sort-package-json
| "axios": "^1.7.2", | ||
| "hsd": "^8.0.0" | ||
| }, | ||
| "devDependencies": { |
There was a problem hiding this comment.
Remove this section, as it is already handled by the root package.json
There was a problem hiding this comment.
We usually don’t write separate markdown files for individual wallets, since the structure is standardized. In the future, documentation will be added for the base wallet in the @rosen-ui/wallet-api package. Therefore, this file can be removed.
| const totalInputHns = utxos.reduce( | ||
| (sum, walletUtxo) => sum + BigInt(walletUtxo.value), | ||
| 0n, | ||
| ); | ||
| throw new Error( | ||
| `Available boxes didn't cover required assets. HNS: ${ | ||
| unwrappedAmount + minSatoshi | ||
| }`, | ||
| { | ||
| cause: { | ||
| totalInputHns, | ||
| fromAddress: fromAddress, | ||
| }, | ||
| }, | ||
| ); |
There was a problem hiding this comment.
This section should be implemented using our existing utility handleUncoveredAssets. For example:
handleUncoveredAssets(
tokenMap,
NETWORKS.handshake.key,
coveredBoxes.uncoveredAssets,
);There was a problem hiding this comment.
Please revert these changes, then pull the latest updates from the dev branch. After that, reinstall the dependencies to ensure the latest fixes (including vulnerability patches) are applied and to avoid any merge conflicts.
| throw new UnsupportedChainError(this.name, this.currentChain); | ||
| } | ||
|
|
||
| if (!this.wallet) { |
There was a problem hiding this comment.
This condition will never occur because it is already validated by the parent before this function is called.
transfer = async (params: WalletTransferParams): Promise<string> => {
this.requireAvailable();
await this.requireConnection();
...
};|
|
||
| private wallet: ShakeWalletAPI | null = null; | ||
|
|
||
| performConnect = async (): Promise<void> => { |
There was a problem hiding this comment.
This function should be reimplemented. The current logic is unnecessarily complicated. Please check the other wallet implementations in the UI repository for reference and follow the same approach.
|
What's holding this up? |
Implementation following RCS-003 - https://github.com/rosen-bridge/rcs/tree/master/rcs-003