@refinableco/refinable-sdk
Advanced tools
Comparing version 4.2.6 to 4.2.7-next.0
@@ -20,3 +20,3 @@ /// <reference types="node" /> | ||
supply: number; | ||
previewImage?: Stream | string; | ||
previewFile?: Stream | string; | ||
name?: string; | ||
@@ -28,3 +28,3 @@ description?: string; | ||
launchpadDetails?: LaunchpadDetailsInput; | ||
previewImage?: Stream | string; | ||
previewFile?: Stream | string; | ||
name?: string; | ||
@@ -31,0 +31,0 @@ description?: string; |
@@ -92,3 +92,3 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var price, startTime, endTime, launchpadDetails, contractAddress, supply, name, description, _a, payee, i, stage, previewImage, _b, contract, nonce, saleId, blockchainId, signature, response; | ||
var price, startTime, endTime, launchpadDetails, contractAddress, supply, name, description, _a, payee, i, stage, previewFile, _b, contract, nonce, saleId, blockchainId, signature, response; | ||
return __generator(this, function (_c) { | ||
@@ -107,8 +107,8 @@ switch (_c.label) { | ||
} | ||
previewImage = params.previewImage; | ||
if (!(params.previewImage && typeof params.previewImage !== "string")) return [3 /*break*/, 2]; | ||
previewFile = params.previewFile; | ||
if (!(params.previewFile && typeof params.previewFile !== "string")) return [3 /*break*/, 2]; | ||
_b = params; | ||
return [4 /*yield*/, this.refinable.uploadFile(params.previewImage)]; | ||
return [4 /*yield*/, this.refinable.uploadFile(params.previewFile)]; | ||
case 1: | ||
_b.previewImage = _c.sent(); | ||
_b.previewFile = _c.sent(); | ||
_c.label = 2; | ||
@@ -155,3 +155,3 @@ case 2: return [4 /*yield*/, this.getContract(contractAddress)]; | ||
blockchainId: blockchainId, | ||
previewImage: previewImage, | ||
previewFile: previewFile, | ||
name: name, | ||
@@ -172,3 +172,3 @@ description: description, | ||
return __awaiter(this, void 0, void 0, function () { | ||
var launchpadDetails, name, description, i, stage, previewImage, _a, response; | ||
var launchpadDetails, name, description, i, stage, previewFile, _a, response; | ||
return __generator(this, function (_b) { | ||
@@ -187,8 +187,8 @@ switch (_b.label) { | ||
} | ||
previewImage = params.previewImage; | ||
if (!(params.previewImage && typeof params.previewImage !== "string")) return [3 /*break*/, 2]; | ||
previewFile = params.previewFile; | ||
if (!(params.previewFile && typeof params.previewFile !== "string")) return [3 /*break*/, 2]; | ||
_a = params; | ||
return [4 /*yield*/, this.refinable.uploadFile(params.previewImage)]; | ||
return [4 /*yield*/, this.refinable.uploadFile(params.previewFile)]; | ||
case 1: | ||
_a.previewImage = _b.sent(); | ||
_a.previewFile = _b.sent(); | ||
_b.label = 2; | ||
@@ -199,3 +199,3 @@ case 2: return [4 /*yield*/, this.refinable.graphqlClient.request(sale_1.UPDATE_MINT_OFFER, { | ||
launchpadDetails: launchpadDetails, | ||
previewImage: previewImage, | ||
previewFile: previewFile, | ||
name: name, | ||
@@ -202,0 +202,0 @@ description: description, |
@@ -240,2 +240,3 @@ "use strict"; | ||
if (!allowed.lt(formattedAmount)) return [3 /*break*/, 6]; | ||
if (!!allowed.eq(0)) return [3 /*break*/, 4]; | ||
if (!(token.name === "USDT" && | ||
@@ -242,0 +243,0 @@ token.address.toLowerCase() == |
@@ -145,6 +145,8 @@ "use strict"; | ||
ContractWrapper.prototype.sendTransactionByFunction = function (method, args, callOverrides) { | ||
var _a, _b; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var func, e_1; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
var func, unsignedTx, e_1; | ||
var _c; | ||
return __generator(this, function (_d) { | ||
switch (_d.label) { | ||
case 0: | ||
@@ -156,11 +158,17 @@ this.contract; | ||
} | ||
_a.label = 1; | ||
_d.label = 1; | ||
case 1: | ||
_a.trys.push([1, 3, , 4]); | ||
return [4 /*yield*/, func.apply(void 0, __spreadArray(__spreadArray([], __read(args), false), [callOverrides], false))]; | ||
case 2: return [2 /*return*/, _a.sent()]; | ||
case 3: | ||
e_1 = _a.sent(); | ||
_d.trys.push([1, 5, , 6]); | ||
if (!((_b = (_a = this.contract) === null || _a === void 0 ? void 0 : _a.populateTransaction) === null || _b === void 0 ? void 0 : _b[method])) return [3 /*break*/, 3]; | ||
return [4 /*yield*/, (_c = this.contract.populateTransaction)[method].apply(_c, __spreadArray(__spreadArray([], __read(args), false), [callOverrides], false))]; | ||
case 2: | ||
unsignedTx = _d.sent(); | ||
console.log(unsignedTx); | ||
_d.label = 3; | ||
case 3: return [4 /*yield*/, func.apply(void 0, __spreadArray(__spreadArray([], __read(args), false), [callOverrides], false))]; | ||
case 4: return [2 /*return*/, _d.sent()]; | ||
case 5: | ||
e_1 = _d.sent(); | ||
throw new TransactionError_1.TransactionError(e_1, this.contract.interface); | ||
case 4: return [2 /*return*/]; | ||
case 6: return [2 /*return*/]; | ||
} | ||
@@ -167,0 +175,0 @@ }); |
{ | ||
"name": "@refinableco/refinable-sdk", | ||
"version": "4.2.6", | ||
"version": "4.2.7-next.0", | ||
"description": "The Refinable SDK allows you to easily interact with the Refinable Marketplace to mint, sell and buy NFTs", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
908973
16059
2