-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Peter/strategy feat proxy account (#1539)
* chore: update monetary to latest 0.7.3 * feat(strategies): use proxy accounts * wip: write into identity pallet to keep track of strategy-proxy mapping * feat(strategies): use proxy accounts saved into identity pallet * chore: cleanup * refactor: code review * feat: add proxy account deposit field to transaction details, repay on withdraw-all * refactor: code review
- Loading branch information
1 parent
e9414ef
commit 96c625d
Showing
21 changed files
with
584 additions
and
105 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 |
---|---|---|
@@ -1,22 +1,34 @@ | ||
import { InterBtcApi } from '@interlay/interbtc-api'; | ||
import { AccountId } from '@polkadot/types/interfaces'; | ||
|
||
import { StrategyType } from '@/pages/Strategies/types'; | ||
|
||
import { Transaction } from '.'; | ||
|
||
interface StrategiesInitializeProxyAction { | ||
type: Transaction.STRATEGIES_INITIALIZE_PROXY; | ||
args: [StrategyType]; | ||
} | ||
|
||
interface StrategiesDepositAction { | ||
type: Transaction.STRATEGIES_DEPOSIT; | ||
args: Parameters<InterBtcApi['loans']['lend']>; | ||
args: [StrategyType, AccountId, boolean, ...Parameters<InterBtcApi['loans']['lend']>]; | ||
} | ||
|
||
interface StrategiesWithdrawAction { | ||
type: Transaction.STRATEGIES_WITHDRAW; | ||
args: Parameters<InterBtcApi['loans']['withdraw']>; | ||
args: [StrategyType, AccountId, ...Parameters<InterBtcApi['loans']['withdraw']>]; | ||
} | ||
|
||
interface StrategiesWithdrawAllAction { | ||
type: Transaction.STRATEGIES_ALL_WITHDRAW; | ||
args: Parameters<InterBtcApi['loans']['withdrawAll']>; | ||
args: [StrategyType, AccountId, ...Parameters<InterBtcApi['loans']['withdraw']>]; | ||
} | ||
|
||
type StrategiesActions = StrategiesDepositAction | StrategiesWithdrawAction | StrategiesWithdrawAllAction; | ||
type StrategiesActions = | ||
| StrategiesInitializeProxyAction | ||
| StrategiesDepositAction | ||
| StrategiesWithdrawAction | ||
| StrategiesWithdrawAllAction; | ||
|
||
export type { StrategiesActions }; |
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.
96c625d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
interbtc-ui-kintsugi-testnet – ./
interbtc-ui-kintsugi-testnet-git-master-interlay.vercel.app
interbtc-ui.vercel.app
interbtc-ui-kintsugi-testnet-interlay.vercel.app
kintnet.interlay.io
96c625d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
interbtc-ui-interlay-testnet – ./
interbtc-ui-interlay-testnet-interlay.vercel.app
interbtc-ui-interlay-testnet-git-master-interlay.vercel.app
interbtc-ui-interlay-testnet.vercel.app
testnet.interlay.io