"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
const token_math_1 = require("@melonproject/token-math");
const initTestEnvironment_1 = require("../../../../tests/utils/initTestEnvironment");
const increaseApproval_1 = require("../transactions/increaseApproval");
const deploy_1 = require("../transactions/deploy");
const getToken_1 = require("../calls/getToken");
describe('increaseApproval', () => {
    const shared = {};
    beforeAll(() => __awaiter(this, void 0, void 0, function* () {
        shared.env = yield initTestEnvironment_1.initTestEnvironment();
        shared.address = yield deploy_1.deployToken(shared.env);
        shared.token = yield getToken_1.getToken(shared.env, shared.address);
    }));
    it('increaseApproval', () => __awaiter(this, void 0, void 0, function* () {
        const accounts = yield shared.env.eth.getAccounts();
        const howMuch = token_math_1.createQuantity(shared.token, '1000000000000000000');
        const receipt = yield increaseApproval_1.increaseApproval(shared.env, {
            howMuch,
            spender: new token_math_1.Address(accounts[0]),
        });
        expect(receipt).toBeTruthy();
    }));
});
