Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TW-753 Taquito update #926

Merged
merged 24 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion e2e/src/features/delegate.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
Feature: Delegate
@dev

Scenario: As a user, i'd like to re-delegate TEZ to a baker
Given I have imported an existing account
And I press Selected Network Button on the Network Select page
And I select ECAD Labs Mainnet node in the networks drop-down list on the Header page
And I check that ECAD Labs Mainnet node is selected correctly
And I press Asset Item Apy Button on the Assets page

And I am on the DelegateTab page
Expand Down
5 changes: 4 additions & 1 deletion e2e/src/features/send.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
Feature: Send
@dev

Scenario: As a user, I'd like to send my funds to another account
Given I have imported an existing account
And I press Selected Network Button on the Network Select page
And I select ECAD Labs Mainnet node in the networks drop-down list on the Header page
And I check that ECAD Labs Mainnet node is selected correctly
And I press Send Button on the Home page

And I am on the Send page
Expand Down
9 changes: 6 additions & 3 deletions e2e/src/features/swap.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
Feature: Swap
@dev

Scenario: As a user, i'd like to swap assets
Given I have imported an existing account
And I press Selected Network Button on the Network Select page
And I select ECAD Labs Mainnet node in the networks drop-down list on the Header page
And I check that ECAD Labs Mainnet node is selected correctly
And I press Swap Button on the Home page

And I am on the Swap page
Expand Down Expand Up @@ -119,7 +122,7 @@ Feature: Swap
And I enter wUSDT into Search Input on the Swap Form (From) Input page
And I select wUSDT token in the token drop-down list on the Swap page
And I clear Asset Input value on the Swap Form (From) Input page
And I enter amount_0_03 into Asset Input on the Swap Form (From) Input page
And I enter amount_0_1 into Asset Input on the Swap Form (From) Input page
And I press Asset Drop-down Button on the Swap Form (To) Input page
And I enter uUSD into Search Input on the Swap Form (To) Input page
And I select uUSD token in the token drop-down list on the Swap page
Expand All @@ -135,7 +138,7 @@ Feature: Swap
And I am on the Swap page
# 10.Swap wUSDT -> uUSD (FA2 -> FA2)
And I press Swap Places Button on the Swap Form page
And I enter amount_0_03 into Asset Input on the Swap Form (From) Input page
And I enter amount_0_1 into Asset Input on the Swap Form (From) Input page
And I click on animated Swap button on the Swap page

And I am on the InternalConfirmation page
Expand Down
3 changes: 2 additions & 1 deletion e2e/src/step-definitions/shared.steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { BrowserContext } from '../classes/browser-context.class';
import { Pages } from '../page-objects';
import { envVars } from '../utils/env.utils';
import { iComparePrivateKeys } from '../utils/input-data.utils';
import { LONG_TIMEOUT, MEDIUM_TIMEOUT } from '../utils/timing.utils';
import { LONG_TIMEOUT, MEDIUM_TIMEOUT, sleep } from '../utils/timing.utils';

Given(
/I reveal a private key and compare with (.*)/,
Expand All @@ -35,6 +35,7 @@ Given(/I'm waiting for 'success ✓' operation status/, { timeout: LONG_TIMEOUT
await BrowserContext.page.waitForSelector(`[data-testid="${OperationStatusSelectors.successDoneOperation}"]`, {
timeout: LONG_TIMEOUT
});
await sleep(10000);
});

const hashObject = {
Expand Down
2 changes: 0 additions & 2 deletions e2e/src/step-definitions/swap.steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import { iSelectTokenSlugs } from 'e2e/src/utils/input-data.utils';
import { createPageElement } from 'e2e/src/utils/search.utils';
import { MEDIUM_TIMEOUT, VERY_LONG_TIMEOUT } from 'e2e/src/utils/timing.utils';

import { BrowserContext } from '../classes/browser-context.class';

Given(
/I select (.*) token in the token drop-down list on the Swap page/,
{ timeout: VERY_LONG_TIMEOUT },
Expand Down
2 changes: 1 addition & 1 deletion e2e/src/utils/input-data.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const iEnterValues = {
// For transactions
amount_0_0001: '0.0001',
amount_0_005: '0.005',
amount_0_03: '0.03',
amount_0_1: '0.1',
amount_1: '1',
kUSD: 'kUSD',
uUSD: 'uUSD',
Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,20 @@
"@rnw-community/shared": "^0.48.0",
"@serh11p/jest-webextension-mock": "4.0.0",
"@svgr/webpack": "6.4.0",
"@taquito/ledger-signer": "15.0.1",
"@taquito/local-forging": "15.0.1",
"@taquito/michel-codec": "15.0.1",
"@taquito/michelson-encoder": "15.0.1",
"@taquito/rpc": "15.0.1",
"@taquito/signer": "15.0.1",
"@taquito/taquito": "15.0.1",
"@taquito/tzip12": "15.0.1",
"@taquito/tzip16": "15.0.1",
"@taquito/utils": "15.0.1",
"@taquito/ledger-signer": "17.0.0",
"@taquito/local-forging": "17.0.0",
"@taquito/michel-codec": "17.0.0",
"@taquito/michelson-encoder": "17.0.0",
"@taquito/rpc": "17.0.0",
"@taquito/signer": "17.0.0",
"@taquito/taquito": "17.0.0",
"@taquito/tzip12": "17.0.0",
"@taquito/tzip16": "17.0.0",
"@taquito/utils": "17.0.0",
"@temple-wallet/dapp": "5.0.2",
"@temple-wallet/wallet-address-validator": "^0.4.2",
"@tezos-domains/core": "1.21.0",
"@tezos-domains/taquito-client": "1.21.0",
"@tezos-domains/core": "1.26.0",
"@tezos-domains/taquito-client": "1.26.0",
"@types/async-retry": "1.4.3",
"@types/bs58check": "^2.1.0",
"@types/debounce-promise": "3.1.4",
Expand Down Expand Up @@ -220,11 +220,11 @@
"nanoid": "3.1.31",
"tslib": "2.4.0",
"@types/react": "18.0.15",
"@taquito/taquito": "15.0.1",
"@taquito/utils": "15.0.1",
"@taquito/beacon-wallet": "15.0.1",
"@taquito/contracts-library": "15.0.1",
"@taquito/tzip16": "15.0.1",
"@taquito/taquito": "17.0.0",
"@taquito/utils": "17.0.0",
"@taquito/beacon-wallet": "17.0.0",
"@taquito/contracts-library": "17.0.0",
"@taquito/tzip16": "17.0.0",
"bignumber.js": "9.1.0",
"graphql-request": "^6.1.0"
}
Expand Down
16 changes: 8 additions & 8 deletions src/lib/temple/back/dryrun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@ export async function dryRunOpParams({
let estimates: Estimate[] | undefined;
let error: any = [];
try {
const formated = opParams.map(formatOpParamsBeforeSend);
const result = await Promise.all([
tezos.contract
.batch(formated)
const formatted = opParams.map(formatOpParamsBeforeSend);
const result = [
await tezos.estimate.batch(formatted).catch(e => ({ ...e, isError: true })),
await tezos.contract
.batch(formatted)
.send()
.catch(e => ({ ...e, isError: true })),
tezos.estimate.batch(formated).catch(e => ({ ...e, isError: true }))
]);
.catch(e => ({ ...e, isError: true }))
];
if (result.every(x => x.isError)) {
error = result;
}
estimates = result[1]?.map(
estimates = result[0]?.map(
(e: any, i: number) =>
({
...e,
Expand Down
7 changes: 7 additions & 0 deletions src/lib/temple/front/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import {
WalletProvider,
createOriginationOperation,
createSetDelegateOperation,
createIncreasePaidStorageOperation,
createTransferOperation,
WalletDelegateParams,
WalletOriginateParams,
WalletIncreasePaidStorageParams,
WalletTransferParams
} from '@taquito/taquito';
import { buf2hex } from '@taquito/utils';
Expand Down Expand Up @@ -398,6 +400,11 @@ class TaquitoWallet implements WalletProvider {
return this.pkh;
}

async mapIncreasePaidStorageWalletParams(params: () => Promise<WalletIncreasePaidStorageParams>) {
const walletParams = await params();
return withoutFeesOverride(walletParams, await createIncreasePaidStorageOperation(walletParams));
}

async mapTransferParamsToWalletParams(params: () => Promise<WalletTransferParams>) {
const walletParams = await params();
return withoutFeesOverride(walletParams, await createTransferOperation(walletParams));
Expand Down
Loading
Loading