Skip to content

Commit

Permalink
register and delegate
Browse files Browse the repository at this point in the history
  • Loading branch information
abdelkrimdev committed Nov 26, 2022
1 parent 14613a1 commit 345f744
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/demo/package.json
Expand Up @@ -15,7 +15,7 @@
"@headlessui/react": "^1.6.6",
"@heroicons/react": "^2.0.10",
"@martifylabs/mesh": "1.2.0-beta.2",
"@martifylabs/mesh-react": "1.0.1-beta.5",
"@martifylabs/mesh-react": "1.0.1-beta.6",
"copy-to-clipboard": "^3.3.2",
"flowbite": "^1.5.3",
"flowbite-react": "^0.1.10",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Expand Up @@ -3,7 +3,7 @@
"description": "React Hooks & Components you need for building dApps on Cardano.",
"homepage": "https://mesh.martify.io",
"author": "MartifyLabs",
"version": "1.0.1-beta.5",
"version": "1.0.1-beta.6",
"license": "Apache-2.0",
"type": "module",
"repository": {
Expand Down
5 changes: 4 additions & 1 deletion packages/react/src/components/StakeButton/StakeButton.tsx
Expand Up @@ -104,7 +104,10 @@ const Delegate = ({ poolId, onCheck }) => {
setProcessing(true);
try {
if (rewardAddress) {
const unsignedTx = await tx.registerStake(rewardAddress).build();
const unsignedTx = await tx
.registerStake(rewardAddress)
.delegateStake(rewardAddress, poolId)
.build();

const signedTx = await wallet.signTx(unsignedTx);
console.log('signedTx', signedTx);
Expand Down

0 comments on commit 345f744

Please sign in to comment.