@super-protocol/sdk-js 0.10.2-beta.0 → 0.10.2-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -158,7 +158,7 @@ var OffersFactory = /** @class */ (function () {
|
|
|
158
158
|
.OfferCreated()
|
|
159
159
|
.on("data", function (event) { return __awaiter(_this, void 0, void 0, function () {
|
|
160
160
|
return __generator(this, function (_a) {
|
|
161
|
-
callback(event.returnValues.offerId, event.returnValues.creator, event.returnValues.externalId, {
|
|
161
|
+
callback(event.returnValues.offerId, event.returnValues.creator, (0, utils_2.parseBytes32String)(event.returnValues.externalId), {
|
|
162
162
|
index: event.blockNumber,
|
|
163
163
|
hash: event.blockHash,
|
|
164
164
|
});
|
|
@@ -199,7 +199,6 @@ var OrdersFactory = /** @class */ (function () {
|
|
|
199
199
|
(0, utils_1.checkIfActionAccountInitialized)(transactionOptions);
|
|
200
200
|
preparedInfo = __assign(__assign({}, parentOrderInfo), { externalId: (0, utils_2.formatBytes32String)(parentOrderInfo.externalId) });
|
|
201
201
|
parentOrderInfoArgs = (0, utils_1.objectToTuple)(preparedInfo, Order_1.OrderInfoStructure);
|
|
202
|
-
subOrdersInfo.forEach(function (o) { return (o.externalId = (0, utils_2.formatBytes32String)(o.externalId)); });
|
|
203
202
|
preparedSubOrdersInfo = subOrdersInfo.map(function (o) { return (__assign(__assign({}, o), { externalId: (0, utils_2.formatBytes32String)(o.externalId) })); });
|
|
204
203
|
subOrdersInfoArgs = (0, utils_1.objectToTuple)(preparedSubOrdersInfo, Order_1.OrderInfoStructureArray);
|
|
205
204
|
return [4 /*yield*/, TxManager_1.default.execute(contract.methods.createWorkflow, [parentOrderInfoArgs, holdDeposit, subOrdersInfoArgs], transactionOptions)];
|
|
@@ -182,10 +182,10 @@ var ProviderRegistry = /** @class */ (function () {
|
|
|
182
182
|
var contract = BlockchainConnector_1.default.getContractInstance();
|
|
183
183
|
var logger = this.logger.child({ method: "onProviderRegistered" });
|
|
184
184
|
var subscription = contract.events
|
|
185
|
-
.
|
|
185
|
+
.ProviderRegistered()
|
|
186
186
|
.on("data", function (event) { return __awaiter(_this, void 0, void 0, function () {
|
|
187
187
|
return __generator(this, function (_a) {
|
|
188
|
-
callback(event.returnValues.
|
|
188
|
+
callback(event.returnValues.auth, {
|
|
189
189
|
index: event.blockNumber,
|
|
190
190
|
hash: event.blockHash,
|
|
191
191
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BlockInfo, TransactionOptions } from "../types/Web3";
|
|
2
2
|
import { TeeOfferInfo } from "../types/TeeOffer";
|
|
3
|
-
import { OfferType } from "../types/Offer";
|
|
4
3
|
import { OfferCreatedEvent } from "../types/Events";
|
|
5
4
|
declare class TeeOffersFactory {
|
|
6
5
|
private static readonly logger;
|
|
@@ -32,6 +31,6 @@ declare class TeeOffersFactory {
|
|
|
32
31
|
static onTeeOfferCreated(callback: onTeeOfferCreatedCallback): () => void;
|
|
33
32
|
static onTeeOfferViolationRateChanged(callback: onTeeOfferViolationRateChangedCallback): () => void;
|
|
34
33
|
}
|
|
35
|
-
export declare type onTeeOfferCreatedCallback = (offerId: string,
|
|
34
|
+
export declare type onTeeOfferCreatedCallback = (offerId: string, creator: string, externalId: string, block?: BlockInfo) => void;
|
|
36
35
|
export declare type onTeeOfferViolationRateChangedCallback = (offerId: string, providerAuth: string, violationRate: number, block?: BlockInfo) => void;
|
|
37
36
|
export default TeeOffersFactory;
|
|
@@ -162,10 +162,10 @@ var TeeOffersFactory = /** @class */ (function () {
|
|
|
162
162
|
var contract = BlockchainConnector_1.default.getContractInstance();
|
|
163
163
|
var logger = this.logger.child({ method: "onTeeOfferCreated" });
|
|
164
164
|
var subscription = contract.events
|
|
165
|
-
.
|
|
165
|
+
.TeeOfferCreated()
|
|
166
166
|
.on("data", function (event) { return __awaiter(_this, void 0, void 0, function () {
|
|
167
167
|
return __generator(this, function (_a) {
|
|
168
|
-
callback(event.returnValues.offerId, event.returnValues.
|
|
168
|
+
callback(event.returnValues.offerId, event.returnValues.creator, (0, utils_2.parseBytes32String)(event.returnValues.externalId), {
|
|
169
169
|
index: event.blockNumber,
|
|
170
170
|
hash: event.blockHash,
|
|
171
171
|
});
|