Skip to content

Commit

Permalink
Sprint 1 fixes (#1542)
Browse files Browse the repository at this point in the history
* fix scrolling on aggregate tx page (#1352)

* fix: balance aligment UI issue. (#1521)

* checks if bonded is signed in transactions history list  (#1522)

* checks if bonded is signed in transactions history list #1488

* Update src/language/zh-CN.json

Co-authored-by: Anthony Law <yc-law1015@hotmail.com>

* refactor needsCosignature check to async

Co-authored-by: Anthony Law <yc-law1015@hotmail.com>

* bugfix/Scanning a qr with no mosaics breaks the wallet (#1518)

* fix Scanning a QR Code for a Transfer Transaction without Mosaics breaks the Wallet #1503

* fix fees list consistency

* fix mosaic amount sometimes not shown while importing mnemonic (#1517)

* fix #1514

* add loader on fetching accounts balances

* remove setTimeout

* enhance profile creation phrasing (#1512)

* Rephrased profile creation

* fix #930

Co-authored-by: olegliallin <olegliallin@gmail.com>

* fix wrong expired message for mosaics with 0 balance #1468 (#1511)

* fix setting popup styles (#1509)

* fix setting popup styles #1448

* fix redundant scrollbar

* fix fees not always displayed

* fix scrollbar issue

* update settings modal

* Gh1431 harvesting fix (#1528)

* fix #1431 #1332

* fix harvesting showing wrong status on fresh accounts

* fix #1264 (#1480)

* fix error message while creating new profile on ledger (#1508)

* fix error message while creating new profile on ledger #1483

* remove logs

* fix icons inconsistency (#1507)

* fix iconsconsistency #1446

* update multisigForm add button styles

* fix button style

* fix #1445

* fix #1472 (#1506)

* Fix harvesting tabs alignment  (#1500)

* sort fees selector options #1430

* fix tab alignments in harvesting page #1441

* fixes #1491

* update fees selector

* fix amount field bug while importing transaction from a qr-code (#1485)

* fix #1459 (#1460)

* fix date not showing properly for aggregate transactions #1459

* fix transfer transaction date diplay

* update hashlock date representation

* Fix log in/log out spelling (#1450)

"Log in/out" is a verb, whereas "login/logout" are nouns.

* fix #1076 #1416 (#1449)

* fix #1076 #1416

* Update src/language/en-US.json

Co-authored-by: Xavi Artigas <xavierartigas@yahoo.es>

* update settings modal to select networkTab when opened from node selector

Co-authored-by: Xavi Artigas <xavierartigas@yahoo.es>

* fix #873 (#1458)

* fix #873

* update namespaceTableService

* fix expiry checkbox

* fix validation for namespace name #1376 (#1452)

* fix validation for namespace name #1376

* Update src/language/en-US.json

Co-authored-by: Xavi Artigas <xavierartigas@yahoo.es>

* Update src/language/en-US.json

Co-authored-by: Xavi Artigas <xavierartigas@yahoo.es>

* add comment to update regex when rest is fixed

Co-authored-by: Xavi Artigas <xavierartigas@yahoo.es>

* fix: namespace expired logic error. (#1525)

* display delegate harvesting message properly (#1513)

* fix connected nodes doesn't show up in node selector harvesting (#1502)

* fix connected nodes doesn't show up in node selector harvesting #1106

* update peerNodes

* fix un-signed transactions disappear after signing another partial #1487 (#1499)

* fix the unablity to add node when all default nodes offline #1236 (#1489)

* fix #1432 (#1439)

* fix Harvesting when importing harvesting private key from node operator #1432

* fix #1432

* Update NetworkNodeSelectorTs.ts

* fix translation in login page

* Gh1090 improve transaction previews (#1540)

* improve transactiondashboard preview #1190

* Update src/language/en-US.json

Co-authored-by: Xavi Artigas <xavierartigas@yahoo.es>

* update mosaic list tooltip

Co-authored-by: Xavi Artigas <xavierartigas@yahoo.es>

* Revert "Gh1090 improve transaction previews (#1540)" (#1543)

This reverts commit 12a0d3d.

* fix #1432

Co-authored-by: myxmaster <77545287+myxmaster@users.noreply.github.com>
Co-authored-by: Anthony Law <yc-law1015@hotmail.com>
Co-authored-by: olegliallin <olegliallin@gmail.com>
Co-authored-by: Xavi Artigas <xavierartigas@yahoo.es>
  • Loading branch information
5 people committed Jun 18, 2021
1 parent c56910d commit 38a7591
Show file tree
Hide file tree
Showing 66 changed files with 559 additions and 196 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/components/AccountLinks/AccountLinks.less
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
color: @purpleDark;
display: flex;
align-items: center;
z-index: 11;
}

.navbar-icon {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and limitations under the License.
*
*/
// external dependencies
// @ts-ignore
import ButtonAdd from '@/components/ButtonAdd/ButtonAdd';
// @ts-ignore
Expand Down Expand Up @@ -42,6 +41,7 @@ import ModalFormWrap from '@/views/modals/ModalFormWrap/ModalFormWrap.vue';
import ModalMetadataDisplay from '@/views/modals/ModalMetadataDisplay/ModalMetadataDisplay.vue';
// @ts-ignore
import ModalMetadataUpdate from '@/views/modals/ModalMetadataUpdate/ModalMetadataUpdate.vue';
// external dependencies
import { Address } from 'symbol-sdk';
import { Component, Prop, Watch } from 'vue-property-decorator';
import { mapGetters } from 'vuex';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ActionDisplay/ActionDisplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/>
</div>
<div class="bottom overflow_ellipsis">
<span>{{ $t(`transaction_descriptor_${transaction.type}${isOptinPayoutTransaction ? '_optin' : ''}`) }}</span>
<span>{{ getTransactionType() }}</span>
<span v-if="needsCosignature" class="click-to-cosign">({{ $t('click_to_cosign') }})</span>
</div>
</div>
Expand Down
14 changes: 13 additions & 1 deletion src/components/ActionDisplay/ActionDisplayTs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
*
*/
import { Component, Prop, Vue } from 'vue-property-decorator';
import { Address, Transaction, TransactionType } from 'symbol-sdk';
import { Address, PersistentHarvestingDelegationMessage, Transaction, TransactionType, TransferTransaction } from 'symbol-sdk';
// @ts-ignore
import AddressDisplay from '@/components/AddressDisplay/AddressDisplay.vue';
import { mapGetters } from 'vuex';
import i18n from '@/language';

@Component({
components: {
Expand Down Expand Up @@ -60,4 +61,15 @@ export class ActionDisplayTs extends Vue {
* @type {boolean}
*/
protected needsCosignature: boolean = false;

/**
* Returns transaction type label
*/
protected getTransactionType() {
if (this.transaction instanceof TransferTransaction && this.transaction.message instanceof PersistentHarvestingDelegationMessage) {
return i18n.t('transaction_descriptor_harvesting');
}

return i18n.t(`transaction_descriptor_${this.transaction.type}${this.isOptinPayoutTransaction ? '_optin' : ''}`);
}
}
2 changes: 1 addition & 1 deletion src/components/AddCosignatoryInput/AddCosignatoryInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/>
</ErrorTooltip>
</div>
<ButtonAdd class="button-add align-right" @click="handleSubmit(onAddCosignatory())" />
<ButtonAdd class="button-add align-right" :size="24" @click="handleSubmit(onAddCosignatory())" />
</ValidationProvider>
</ValidationObserver>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ButtonRefresh/ButtonRefresh.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<Tooltip :content="$t('refresh')" placement="top" :transfer="true">
<Icon type="md-refresh" class="button-refresh" @click="$emit('click')" />
<Icon type="md-refresh" class="button-refresh" size="size" @click="$emit('click')" />
</Tooltip>
</template>
<script lang="ts">
Expand Down
6 changes: 4 additions & 2 deletions src/components/ButtonRefresh/ButtonRefreshTs.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Vue, Component } from 'vue-property-decorator';
import { Vue, Component, Prop } from 'vue-property-decorator';
@Component
export class ButtonRefreshTs extends Vue {}
export class ButtonRefreshTs extends Vue {
@Prop({ default: undefined }) size: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@
import { Component, Vue, Prop } from 'vue-property-decorator';
import { mapGetters } from 'vuex';
import { NetworkType } from 'symbol-sdk';
import { ValidationProvider } from 'vee-validate';

// child components
import { ValidationProvider } from 'vee-validate';
// @ts-ignore
import FormRow from '@/components/FormRow/FormRow.vue';

// @ts-ignore
import ErrorTooltip from '@/components/ErrorTooltip/ErrorTooltip.vue';
import { CosignatoryModifications } from '@/views/forms/FormMultisigAccountModificationTransaction/FormMultisigAccountModificationTransactionTs';
// @ts-ignore
import CosignatoryModifications from '@/views/forms/FormMultisigAccountModificationTransaction/FormMultisigAccountModificationTransactionTs';

@Component({
components: {
Expand Down
3 changes: 0 additions & 3 deletions src/components/MaxFeeSelector/MaxFeeSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
<Icon type="ios-warning-outline" />
{{ $t('low_fee_warning_message') }}
</span>
<span v-else-if="transactionFees.minFeeMultiplier && !displayOnly" style="color: #ff9600;">
{{ $t('minimal_fee_transaction') + transactionFees.minFeeMultiplier.toString() }}
</span>
</div>
</template>

Expand Down
31 changes: 17 additions & 14 deletions src/components/MaxFeeSelector/MaxFeeSelectorTs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ export class MaxFeeSelectorTs extends Vue {
@Prop({ default: false })
public displayOnly!: boolean;

/**
* Value set by the parent component's v-model
* @type {number}
*/
@Prop({
default: 10,
})
value: number;

public placement: string;

/**
Expand All @@ -57,10 +66,11 @@ export class MaxFeeSelectorTs extends Vue {
*/
private networkMosaicName: string;
private feesConfig: {
fast: number;
median: number;
slow: number;
slowest: number;
median: number;
fast: number;
free: number;
};

/**
Expand Down Expand Up @@ -104,6 +114,9 @@ export class MaxFeeSelectorTs extends Vue {
multiplier: number;

public created() {
if (!this.feesConfig) {
this.$store.dispatch('network/LOAD_TRANSACTION_FEES');
}
this.fees = Object.entries(this.feesConfig).map((entry) => ({
label: this.getLabel([entry[0], entry[1] as number]),
maxFee: entry[1] as number,
Expand Down Expand Up @@ -145,22 +158,13 @@ export class MaxFeeSelectorTs extends Vue {
return label;
}

/**
* Value set by the parent component's v-model
* @type {number}
*/
@Prop({
default: 10,
})
value: number;

/// region computed properties getter/setter
/**
* Value set by the parent component
* @type {number}
*/
get chosenMaxFee(): number {
return typeof this.value === 'number' ? this.value : this.defaultFee;
return typeof this.value === 'number' ? this.value : typeof this.value === 'string' ? Number(this.value) : this.defaultFee;
}

/**
Expand Down Expand Up @@ -220,7 +224,6 @@ export class MaxFeeSelectorTs extends Vue {
return i;
}
})
.slice()
.sort((a, b) => a.calculatedFee - b.calculatedFee);
.slice();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export class MosaicAttachmentInputTs extends Vue {
* @type {{mosaicHex: string, amount: number}}
*/
protected get chosenValue(): { mosaicHex: string; amount: string } {
this.mosaicAttachment.amount = this.mosaicAttachment.amount.replace(',', '');
return this.mosaicAttachment;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@

<AddCosignatoryInput v-if="isAddingCosignatory" @added="onAddCosignatory" />
<div v-if="!isAddingCosignatory" class="row-cosignatory-modification-display inputs-container link mx-1">
<img src="@/views/resources/img/newicons/Add.svg" class="icon-left-button clickable" @click="isAddingCosignatory = true" />
<ButtonAdd class="clickable" :size="24" @click="isAddingCosignatory = true" />
<a href="#" style="color: #5200c6;" @click="isAddingCosignatory = true">{{ $t('form_label_add_cosignatory') }}</a>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import { MultisigAccountInfo, Address } from 'symbol-sdk';
import FormRow from '@/components/FormRow/FormRow.vue';
// @ts-ignore
import AddCosignatoryInput from '@/components/AddCosignatoryInput/AddCosignatoryInput.vue';
// @ts-ignore
import ButtonAdd from '@/components/ButtonAdd/ButtonAdd';

// custom types
type AddOrRemove = 'add' | 'remove';
Expand All @@ -37,6 +39,7 @@ type Cosignatories = { address: Address }[];
components: {
FormRow,
AddCosignatoryInput,
ButtonAdd,
},
})
export class MultisigCosignatoriesDisplayTs extends Vue {
Expand Down
7 changes: 5 additions & 2 deletions src/components/NavigationLinks/NavigationLinks.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
}
&.active-item {
background-color: #f3f4f8;
border-right: 0.3em #ff00ff solid;
}
}
}
Expand All @@ -32,8 +33,10 @@
grid-auto-flow: column;
justify-items: start;
justify-content: start;
background-color: transparent;

position: sticky;
top: 0;
background-color: white;
z-index: 1;
.empty {
display: flex;
height: 100%;
Expand Down
23 changes: 14 additions & 9 deletions src/components/NetworkNodeSelector/NetworkNodeSelectorTs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import FormWrapper from '@/components/FormWrapper/FormWrapper.vue';
import FormRow from '@/components/FormRow/FormRow.vue';
import { NodeModel } from '@/core/database/entities/NodeModel';
import { URLHelpers } from '@/core/utils/URLHelpers';
import { NetworkType, NodeInfo, RepositoryFactoryHttp, RoleType } from 'symbol-sdk';
import { AccountInfo, NetworkType, NodeInfo, RepositoryFactoryHttp, RoleType } from 'symbol-sdk';
import { NotificationType } from '@/core/utils/NotificationType';
import { ProfileModel } from '@/core/database/entities/ProfileModel';

Expand All @@ -24,6 +24,7 @@ import { ProfileModel } from '@/core/database/entities/ProfileModel';
peerNodes: 'network/peerNodes',
networkType: 'network/networkType',
currentProfile: 'profile/currentProfile',
currentSignerAccountInfo: 'account/currentSignerAccountInfo',
}),
},
})
Expand Down Expand Up @@ -73,6 +74,7 @@ export class NetworkNodeSelectorTs extends Vue {
public currentProfile: ProfileModel;

private hideList: boolean = false;
private currentSignerAccountInfo: AccountInfo;
/**
* Checks if the given node is eligible for harvesting
* @protected
Expand Down Expand Up @@ -116,8 +118,15 @@ export class NetworkNodeSelectorTs extends Vue {
);
Vue.set(this, 'showInputPublicKey', false);
this.$emit('input', nodeModel);
if (this.isAccountKeyLinked && this.isVrfKeyLinked && this.missingKeys) {
this.$store.dispatch('harvesting/FETCH_STATUS', value);
const unlockedAccounts = await nodeRepository.getUnlockedAccount().toPromise();
let nodeOperatorAccount = false;
const remotePublicKey = this.currentSignerAccountInfo.supplementalPublicKeys?.linked?.publicKey;

if (unlockedAccounts) {
nodeOperatorAccount = unlockedAccounts?.some((publicKey) => publicKey === remotePublicKey);
}
if (this.isAccountKeyLinked && this.isVrfKeyLinked && (this.missingKeys || nodeOperatorAccount)) {
this.$store.dispatch('harvesting/FETCH_STATUS', [value, nodeModel]);
}
} else {
Vue.set(this, 'showInputPublicKey', true);
Expand All @@ -133,6 +142,7 @@ export class NetworkNodeSelectorTs extends Vue {
}

public async created() {
// add static hardcoded nodes to harvesting list
await this.$store.dispatch('network/LOAD_PEER_NODES');
this.customNodeData = this.filteredNodes.map((n) => n.host);
this.filteredData = [...this.customNodeData];
Expand Down Expand Up @@ -196,12 +206,7 @@ export class NetworkNodeSelectorTs extends Vue {
if (this.includeRoles && this.includeRoles.length > 0) {
// exclude ngl nodes that doesn't support harvesting
return this.peerNodes.filter(
(node) =>
node.roles?.some((role) => this.isIncluded(role)) &&
!node.host?.includes('ap-southeast-1.testnet') &&
!node.host.includes('us-east-1.testnet') &&
!node.host.includes('eu-central-1.testnet') &&
node.networkIdentifier === this.networkType,
(node) => node.roles?.some((role) => this.isIncluded(role)) && node.networkIdentifier === this.networkType,
);
}
return this.peerNodes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,30 @@ export class NetworkStatisticsPanelTs extends Vue {
*/
protected isHarvestingEnabled = false;

/**
* Refreshing panel data interval
*/
private refreshingInterval: any;

/**
* Current network target block time
*/
protected get blockGenerationTargetTime(): number {
return this.networkConfiguration.blockGenerationTargetTime;
}

private refreshTransactions() {
this.refreshingInterval = setInterval(async () => {
await this.$store.dispatch('statistics/LOAD', {}, { root: true });
}, 15000);
}
public created() {
if (this.currentAccount) {
this.isHarvestingEnabled = this.harvestingSupportedProfileTypes.includes(this.currentAccount.type);
this.refreshTransactions();
}
}

private destroyed() {
clearInterval(this.refreshingInterval);
}
}

0 comments on commit 38a7591

Please sign in to comment.