Skip to content

Commit

Permalink
back out 'transferable' name change
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Feb 23, 2022
1 parent 0a78627 commit 792c388
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/run-protocol/src/vaultFactory/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
* @property {Ratio} interestRate Annual interest rate charge
* @property {Ratio} liquidationRatio
* @property {boolean} liquidated boolean showing whether liquidation occurred
* @property {'active' | 'liquidating' | 'transferable' | 'closed' | 'liquidated'} vaultState
* @property {'active' | 'liquidating' | 'transfer' | 'closed' | 'liquidated'} vaultState
*/

/**
Expand Down
12 changes: 6 additions & 6 deletions packages/run-protocol/src/vaultFactory/vault.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const trace = makeTracer('Vault');
*
* ACTIVE - vault is in use and can be changed
* LIQUIDATING - vault is being liquidated by the vault manager, and cannot be changed by the user
* TRANSFERABLE - vault is released from the manager and able to be transferred
* TRANSFER - vault is able to be transferred (payments and debits frozen until it has a new owner)
* CLOSED - vault was closed by the user and all assets have been paid out
* LIQUIDATED - vault was closed by the manager, with remaining assets paid to owner
*
Expand All @@ -43,7 +43,7 @@ export const VaultPhase = /** @type {const} */ ({
LIQUIDATING: 'liquidating',
CLOSED: 'closed',
LIQUIDATED: 'liquidated',
TRANSFERABLE: 'transferable',
TRANSFER: 'transfer',
});

/**
Expand All @@ -52,11 +52,11 @@ export const VaultPhase = /** @type {const} */ ({
const validTransitions = {
[VaultPhase.ACTIVE]: [
VaultPhase.LIQUIDATING,
VaultPhase.TRANSFERABLE,
VaultPhase.TRANSFER,
VaultPhase.CLOSED,
],
[VaultPhase.LIQUIDATING]: [VaultPhase.LIQUIDATED],
[VaultPhase.TRANSFERABLE]: [VaultPhase.ACTIVE, VaultPhase.LIQUIDATING],
[VaultPhase.TRANSFER]: [VaultPhase.ACTIVE, VaultPhase.LIQUIDATING],
[VaultPhase.LIQUIDATED]: [],
[VaultPhase.CLOSED]: [],
};
Expand Down Expand Up @@ -296,7 +296,7 @@ export const makeInnerVault = (
break;
case VaultPhase.CLOSED:
case VaultPhase.LIQUIDATED:
case VaultPhase.TRANSFERABLE:
case VaultPhase.TRANSFER:
outerUpdater.finish(uiState);
break;
default:
Expand Down Expand Up @@ -695,7 +695,7 @@ export const makeInnerVault = (
makeCloseInvitation,
makeTransferInvitation: () => {
if (outerUpdater) {
assignPhase(VaultPhase.TRANSFERABLE);
assignPhase(VaultPhase.TRANSFER);
updateUiState();
outerUpdater = null;
}
Expand Down

0 comments on commit 792c388

Please sign in to comment.