Skip to content

Commit

Permalink
Merge pull request #86 from rabbitholegg/add_stake_Execution
Browse files Browse the repository at this point in the history
Add stake execution
  • Loading branch information
Quazia authored Oct 25, 2023
2 parents ac93769 + 059df8b commit 88a6148
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/silent-rats-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rabbitholegg/questdk-plugin-registry": patch
---

Add Stake switch to plugin execution
6 changes: 6 additions & 0 deletions packages/registry/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
type SwapActionParams,
type DelegateActionParams,
type TransactionFilter,
type StakeActionParams,
} from '@rabbitholegg/questdk'

import { Connext } from '@rabbitholegg/questdk-plugin-connext'
Expand Down Expand Up @@ -68,6 +69,11 @@ export const executePlugin = (
return Promise.reject(new PluginActionNotImplementedError())
} else return plugin.delegate(params as unknown as DelegateActionParams)
}
case ActionType.Stake: {
if (plugin.stake === undefined) {
return Promise.reject(new PluginActionNotImplementedError())
} else return plugin.stake(params as unknown as StakeActionParams)
}
default:
throw new Error(`Unknown action type "${actionType}"`)
}
Expand Down

0 comments on commit 88a6148

Please sign in to comment.