diff --git a/src/app/components/account/account.component.html b/src/app/components/account/account.component.html index 72ca071..2a0abc4 100644 --- a/src/app/components/account/account.component.html +++ b/src/app/components/account/account.component.html @@ -29,7 +29,7 @@

Balance

class="btn btn-outline-primary btn-circle mr-2" (click)=" openLink( - 'https://widget.wert.io/default/widget/?commodity=XTZ%3ATezos&address=' + + 'https://widget.wert.io/01HNMCSXNZFNNFY1KG2ECE95A7/widget/?commodity=XTZ%3ATezos&address=' + address ) " diff --git a/src/app/components/operations/operations.component.html b/src/app/components/operations/operations.component.html index a7bf3d0..e131d11 100644 --- a/src/app/components/operations/operations.component.html +++ b/src/app/components/operations/operations.component.html @@ -38,7 +38,7 @@

Operations

class="btn btn-outline-primary btn-circle mr-2" (click)=" openLink( - 'https://widget.wert.io/default/widget/?commodity=XTZ%3ATezos&address=' + + 'https://widget.wert.io/01HNMCSXNZFNNFY1KG2ECE95A7/widget/?commodity=XTZ%3ATezos&address=' + address ) " diff --git a/src/app/utils/tezos/constants.ts b/src/app/utils/tezos/constants.ts index 51c30f6..d06c6e8 100644 --- a/src/app/utils/tezos/constants.ts +++ b/src/app/utils/tezos/constants.ts @@ -1,6 +1,6 @@ -export const MAX_GAS_PER_BLOCK = 2600000; -export const GAS_LIMIT_PLACEHOLDER = '1040000'; -export const STORAGE_LIMIT_PLACEHOLDER = '60000'; +export const MAX_GAS_PER_BLOCK = 1733333; +export const GAS_LIMIT_PER_OPERATION = '1040000'; +export const STORAGE_LIMIT_PER_OPERATION = '60000'; export const FEE_PLACEHOLDER = '0'; export const DEFAULT_GAS_LIMIT = '10300'; diff --git a/src/app/utils/tezos/estimate-fee.ts b/src/app/utils/tezos/estimate-fee.ts index cc03e7a..8aa5b15 100644 --- a/src/app/utils/tezos/estimate-fee.ts +++ b/src/app/utils/tezos/estimate-fee.ts @@ -15,8 +15,8 @@ import { } from './types'; import { MAX_GAS_PER_BLOCK, - GAS_LIMIT_PLACEHOLDER, - STORAGE_LIMIT_PLACEHOLDER, + GAS_LIMIT_PER_OPERATION, + STORAGE_LIMIT_PER_OPERATION, FEE_PLACEHOLDER, MINIMAL_FEE, MINIMAL_FEE_PER_BYTE, @@ -126,14 +126,14 @@ const sumUpFees = async ( if ( ((operation as any).gas_limit && overrideParameters) || - (operation as any).gas_limit === GAS_LIMIT_PLACEHOLDER + (operation as any).gas_limit === GAS_LIMIT_PER_OPERATION ) { (operation as any).gas_limit = gasLimit.toString(); } if ( ((operation as any).storage_limit && overrideParameters) || - (operation as any).storage_limit === STORAGE_LIMIT_PLACEHOLDER + (operation as any).storage_limit === STORAGE_LIMIT_PER_OPERATION ) { (operation as any).storage_limit = storageLimit.toString(); } @@ -173,9 +173,9 @@ export const estimateAndReplaceLimitsAndFee = async ( const gasValue = new BigNumber(MAX_GAS_PER_BLOCK).dividedToIntegerBy( tezosWrappedOperation.contents.length, ); - const gasLimit = new BigNumber(GAS_LIMIT_PLACEHOLDER).gt(gasValue) + const gasLimit = new BigNumber(GAS_LIMIT_PER_OPERATION).gt(gasValue) ? gasValue - : GAS_LIMIT_PLACEHOLDER; + : GAS_LIMIT_PER_OPERATION; const counter = startingCounter ? startingCounter.plus(i).toString() : op.counter; diff --git a/src/app/utils/tezos/prepare-operations.ts b/src/app/utils/tezos/prepare-operations.ts index 9ff6d94..f6cbadd 100644 --- a/src/app/utils/tezos/prepare-operations.ts +++ b/src/app/utils/tezos/prepare-operations.ts @@ -14,8 +14,8 @@ import { ALLOCATION_STORAGE_LIMIT, DEFAULT_GAS_LIMIT, FEE_PLACEHOLDER, - GAS_LIMIT_PLACEHOLDER, - STORAGE_LIMIT_PLACEHOLDER, + GAS_LIMIT_PER_OPERATION, + STORAGE_LIMIT_PER_OPERATION, } from './constants'; import { estimateAndReplaceLimitsAndFee } from './estimate-fee'; import { getBalanceOfAddress } from './get-balance-of-address'; @@ -93,10 +93,10 @@ export const handleTransactionOperation = async ( transactionOperation.counter = transactionOperation.counter ?? defaultCounter; transactionOperation.fee = transactionOperation.fee ?? defaultFee; transactionOperation.gas_limit = - transactionOperation.gas_limit ?? GAS_LIMIT_PLACEHOLDER; + transactionOperation.gas_limit ?? GAS_LIMIT_PER_OPERATION; transactionOperation.storage_limit = - transactionOperation.storage_limit ?? STORAGE_LIMIT_PLACEHOLDER; + transactionOperation.storage_limit ?? STORAGE_LIMIT_PER_OPERATION; return transactionOperation; }; @@ -122,10 +122,10 @@ export const handleOriginationOperation = async ( originationOperation.counter = originationOperation.counter ?? defaultCounter; originationOperation.fee = originationOperation.fee ?? defaultFee; originationOperation.gas_limit = - originationOperation.gas_limit ?? GAS_LIMIT_PLACEHOLDER; + originationOperation.gas_limit ?? GAS_LIMIT_PER_OPERATION; originationOperation.storage_limit = - originationOperation.storage_limit ?? STORAGE_LIMIT_PLACEHOLDER; + originationOperation.storage_limit ?? STORAGE_LIMIT_PER_OPERATION; return originationOperation; };