Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/frontend-upgrade/1-staging' into…
Browse files Browse the repository at this point in the history
… marketplace-price-selector
  • Loading branch information
Privilege Mendes committed Oct 26, 2023
2 parents 58ad251 + 09c7a1d commit 03dbbb7
Show file tree
Hide file tree
Showing 957 changed files with 10,346 additions and 164,075 deletions.
147,392 changes: 0 additions & 147,392 deletions agoric/.yarn/releases/yarn-1.22.5.js

This file was deleted.

66 changes: 33 additions & 33 deletions agoric/contract/src/kreadKit.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,17 +252,17 @@ export const prepareKreadKit = (
const newCharacterName = offerArgs.name;

AmountMath.isGTE(give.Price, mintFeeAmount) ||
assert.fail(X`${errors.mintFeeTooLow}`);
assert.fail(errors.mintFeeTooLow);

!characterState.entries.get('names').includes(newCharacterName) ||
assert.fail(X`${errors.nameTaken(newCharacterName)}`);
assert.fail(errors.nameTaken(newCharacterName));

characterState.bases.getSize() > 0 ||
assert.fail(X`${errors.allMinted}`);
assert.fail(errors.allMinted);

const re = /^[a-zA-Z0-9_-]*$/;
(re.test(newCharacterName) && newCharacterName !== 'names') ||
assert.fail(X`${errors.invalidName}`);
assert.fail(errors.invalidName);

const baseIndex = characterFacet.getRandomBaseIndex();
const baseCharacter = characterState.bases.get(baseIndex);
Expand Down Expand Up @@ -331,7 +331,7 @@ export const prepareKreadKit = (
try {
atomicRearrange(zcf, harden(transfers));
} catch (e) {
assert.fail(X`${errors.rearrangeError}`);
assert.fail(errors.rearrangeError);
}

seat.exit();
Expand Down Expand Up @@ -427,13 +427,13 @@ export const prepareKreadKit = (
// Get current Character Key from inventorySeat
const inventoryCharacterKey =
inventorySeat.getAmountAllocated('CharacterKey');
inventoryCharacterKey || assert.fail(X`${errors.noKeyInInventory}`);
inventoryCharacterKey || assert.fail(errors.noKeyInInventory);

AmountMath.isEqual(
wantedCharacter,
inventoryCharacterKey,
characterBrand,
) || assert.fail(X`${errors.inventoryKeyMismatch}`);
) || assert.fail(errors.inventoryKeyMismatch);

// Ensure inventory STATE will be valid before reallocation
let inventory = inventorySeat
Expand All @@ -446,7 +446,7 @@ export const prepareKreadKit = (
];

characterFacet.validateInventoryState(inventory) ||
assert.fail(X`${errors.duplicateCategoryInInventory}`);
assert.fail(errors.duplicateCategoryInInventory);

/** @type {TransferPart[]} */
const transfers = [];
Expand All @@ -467,7 +467,7 @@ export const prepareKreadKit = (
try {
atomicRearrange(zcf, harden(transfers));
} catch (e) {
assert.fail(X`${errors.rearrangeError}`);
assert.fail(errors.rearrangeError);
}

characterRecord.inventoryKit.recorder.write(
Expand Down Expand Up @@ -508,7 +508,7 @@ export const prepareKreadKit = (
const characterRecord = characterState.entries.get(characterName);
const inventorySeat = characterRecord.inventory;
providedCharacterKey ||
assert.fail(X`${errors.invalidCharacterKey}`);
assert.fail(errors.invalidCharacterKey);

// Get reference to the wanted items and key
const { want } = seat.getProposal();
Expand All @@ -517,15 +517,15 @@ export const prepareKreadKit = (

const inventoryCharacterKey =
inventorySeat.getAmountAllocated('CharacterKey');
inventoryCharacterKey || assert.fail(X`${errors.noKeyInInventory}`);
inventoryCharacterKey || assert.fail(errors.noKeyInInventory);

// Ensure requested key and inventory key match

AmountMath.isEqual(
wantedCharacter,
inventoryCharacterKey,
characterBrand,
) || assert.fail(X`${errors.inventoryKeyMismatch}`);
) || assert.fail(errors.inventoryKeyMismatch);

/** @type {TransferPart[]} */
const transfers = [];
Expand All @@ -546,7 +546,7 @@ export const prepareKreadKit = (
try {
atomicRearrange(zcf, harden(transfers));
} catch (e) {
assert.fail(X`${errors.rearrangeError}`);
assert.fail(errors.rearrangeError);
}

characterRecord.inventoryKit.recorder.write(
Expand Down Expand Up @@ -590,7 +590,7 @@ export const prepareKreadKit = (
const characterRecord = characterState.entries.get(characterName);
const inventorySeat = characterRecord.inventory;
providedCharacterKey ||
assert.fail(X`${errors.invalidCharacterKey}`);
assert.fail(errors.invalidCharacterKey);

const { want } = seat.getProposal();
const {
Expand All @@ -601,13 +601,13 @@ export const prepareKreadKit = (
// Ensure requested key and inventory key match
const inventoryCharacterKey =
inventorySeat.getAmountAllocated('CharacterKey');
inventoryCharacterKey || assert.fail(X`${errors.noKeyInInventory}`);
inventoryCharacterKey || assert.fail(errors.noKeyInInventory);

AmountMath.isEqual(
wantedCharacterAmount,
inventoryCharacterKey,
characterBrand,
) || assert.fail(X`${errors.inventoryKeyMismatch}`);
) || assert.fail(errors.inventoryKeyMismatch);

// Ensure inventory STATE is valid before reallocation
let inventory = inventorySeat
Expand All @@ -627,7 +627,7 @@ export const prepareKreadKit = (
];

characterFacet.validateInventoryState(inventory) ||
assert.fail(X`${errors.duplicateCategoryInInventory}`);
assert.fail(errors.duplicateCategoryInInventory);

/** @type {TransferPart[]} */
const transfers = [];
Expand Down Expand Up @@ -659,7 +659,7 @@ export const prepareKreadKit = (
try {
atomicRearrange(zcf, harden(transfers));
} catch (e) {
assert.fail(X`${errors.rearrangeError}`);
assert.fail(errors.rearrangeError);
}

characterRecord.inventoryKit.recorder.write(
Expand Down Expand Up @@ -701,7 +701,7 @@ export const prepareKreadKit = (
const characterRecord = characterState.entries.get(characterName);
const inventorySeat = characterRecord.inventory;
providedCharacterKey ||
assert.fail(X`${errors.invalidCharacterKey}`);
assert.fail(errors.invalidCharacterKey);

// Get reference to the wanted item
const { want } = seat.getProposal();
Expand All @@ -710,15 +710,15 @@ export const prepareKreadKit = (
// Get Character Key from inventorySeat
const inventoryCharacterKey =
inventorySeat.getAmountAllocated('CharacterKey');
inventoryCharacterKey || assert.fail(X`${errors.noKeyInInventory}`);
inventoryCharacterKey || assert.fail(errors.noKeyInInventory);

const items = inventorySeat.getAmountAllocated('Item', itemBrand);

AmountMath.isEqual(
wantedCharacter,
inventoryCharacterKey,
characterBrand,
) || assert.fail(X`${errors.inventoryKeyMismatch}`);
) || assert.fail(errors.inventoryKeyMismatch);

/** @type {TransferPart[]} */
const transfers = [];
Expand All @@ -739,7 +739,7 @@ export const prepareKreadKit = (
try {
atomicRearrange(zcf, harden(transfers));
} catch (e) {
assert.fail(X`${errors.rearrangeError}`);
assert.fail(errors.rearrangeError);
}
seat.exit();

Expand Down Expand Up @@ -1071,7 +1071,7 @@ export const prepareKreadKit = (
const { want } = seat.getProposal();

paymentBrand === want.Price.brand ||
assert.fail(X`${errors.incorrectPaymentBrand(paymentBrand)}`);
assert.fail(errors.incorrectPaymentBrand(paymentBrand));
const askingPrice = {
brand: want.Price.brand,
value: want.Price.value,
Expand Down Expand Up @@ -1143,7 +1143,7 @@ export const prepareKreadKit = (
const { want } = seat.getProposal();

paymentBrand === want.Price.brand ||
assert.fail(X`${errors.incorrectPaymentBrand(paymentBrand)}`);
assert.fail(errors.incorrectPaymentBrand(paymentBrand));
const askingPrice = {
brand: want.Price.brand,
value: want.Price.value,
Expand Down Expand Up @@ -1215,7 +1215,7 @@ export const prepareKreadKit = (
// Find store record based on wanted character
const sellRecord = market.itemEntries.get(offerArgs.entryId);
sellRecord ||
assert.fail(X`${errors.itemNotFound(offerArgs.entryId)}`);
assert.fail(errors.itemNotFound(offerArgs.entryId));

const result = await (sellRecord.isFirstSale
? marketFacet.buyFirstSaleItem(
Expand All @@ -1228,7 +1228,7 @@ export const prepareKreadKit = (
buyerSeat,
sellRecord,
));
result.success || assert.fail(X`${result.error}`);
result.success || assert.fail(result.error);
};

return zcf.makeInvitation(
Expand Down Expand Up @@ -1331,7 +1331,7 @@ export const prepareKreadKit = (
try {
atomicRearrange(zcf, harden(transfers));
} catch (e) {
assert.fail(X`${errors.rearrangeError}`);
assert.fail(errors.rearrangeError);
}
buyerSeat.exit();
zcfSeat.exit();
Expand Down Expand Up @@ -1449,7 +1449,7 @@ export const prepareKreadKit = (
try {
atomicRearrange(zcf, harden(transfers));
} catch (e) {
assert.fail(X`${errors.rearrangeError}`);
assert.fail(errors.rearrangeError);
}

buyerSeat.exit();
Expand Down Expand Up @@ -1485,12 +1485,12 @@ export const prepareKreadKit = (

// Find characterRecord entry based on wanted character
const characterRecord = characterState.entries.get(character.name);
characterRecord || assert.fail(X`${errors.character404}`);
characterRecord || assert.fail(errors.character404);

// Find store record based on wanted character
const sellRecord = market.characterEntries.get(character.name);

sellRecord || assert.fail(X`${errors.character404}`);
sellRecord || assert.fail(errors.character404);
const sellerSeat = sellRecord.seat;

// Inspect Price keyword from buyer seat
Expand All @@ -1502,7 +1502,7 @@ export const prepareKreadKit = (
wantedCharacterAmount,
characterForSaleAmount,
characterBrand,
) || assert.fail(X`${errors.sellerSeatMismatch}`);
) || assert.fail(errors.sellerSeatMismatch);

const characterForSalePrice = sellRecord.askingPrice;

Expand All @@ -1513,7 +1513,7 @@ export const prepareKreadKit = (
sellRecord.platformFee,
),
paymentBrand,
) || assert.fail(X`${errors.insufficientFunds}`);
) || assert.fail(errors.insufficientFunds);
const { zcfSeat, userSeat } = zcf.makeEmptySeatKit();

/** @type {TransferPart[]} */
Expand Down Expand Up @@ -1549,7 +1549,7 @@ export const prepareKreadKit = (
try {
atomicRearrange(zcf, harden(transfers));
} catch (e) {
assert.fail(X`${errors.rearrangeError}`);
assert.fail(errors.rearrangeError);
}
zcfSeat.exit();

Expand Down
2 changes: 1 addition & 1 deletion agoric/contract/src/market-metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const updateCollectionMetrics = (collection, state, updateMetrics) => {
metrics.marketplaceAverageLevel = updateAverage(
updateMetrics.marketplaceAverageLevel.type,
metrics.marketplaceAverageLevel,
state.market.characterEntries.getSize(),
state.market[`${collection}Entries`].getSize(),
updateMetrics.marketplaceAverageLevel.value,
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ spec:
spec:
containers:
- name: ui
image: "eu.gcr.io/web3-335312/kread/frontend-staging/frontend:latest"
image: "eu.gcr.io/web3-335312/kread/frontend-staging/frontend:latest"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 03dbbb7

Please sign in to comment.