This file contains hidden or 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
@Test | |
fun testQuorum() { | |
var keypair1 = ModelCrypto().generateKeypair() | |
var keypair2 = ModelCrypto().generateKeypair() | |
var txBuilder = ModelUtil.getModelTransactionBuilder() | |
var tx = txBuilder | |
.createdTime(ModelUtil.getCurrentTime()) | |
.creatorAccountId("test@notary") | |
.createAccount("multisig", "notary", keypair1.publicKey()) | |
.appendRole("multisig@notary", "tester") |
This file contains hidden or 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
async subscribeOnAverageCollateralPrices(context): Promise<void> { | |
const { commit, state } = vaultActionContext(context); | |
const { collaterals, averageCollateralPriceSubscriptions } = state; | |
const newIds: string[] = []; | |
const idsToRemove: string[] = []; | |
// Check if there are new collateral assets or some of them were removed | |
// TODO Please, check - stablecoins may be different as well as collaterals | |
for (const collateralId in collaterals) { | |
if (!(collateralId in averageCollateralPriceSubscriptions)) { | |
newIds.push(collateralId); |
OlderNewer