diff --git a/frontend/src/app/generic-viewer/generic-viewer.page.html b/frontend/src/app/generic-viewer/generic-viewer.page.html index 99e9e365..566fe510 100644 --- a/frontend/src/app/generic-viewer/generic-viewer.page.html +++ b/frontend/src/app/generic-viewer/generic-viewer.page.html @@ -45,7 +45,8 @@ Audio not supported by browser - +
diff --git a/frontend/src/app/list-inscriptions/list-inscriptions.page.html b/frontend/src/app/list-inscriptions/list-inscriptions.page.html index ec2e4d34..35c4f610 100644 --- a/frontend/src/app/list-inscriptions/list-inscriptions.page.html +++ b/frontend/src/app/list-inscriptions/list-inscriptions.page.html @@ -12,23 +12,29 @@ - - - - - Latest - Oldest - - - - - - - - - - - + + + + + + + + + + + + + + + + Latest + Oldest + + + + + @@ -40,7 +46,7 @@
+ *ngFor="let item of inscriptions; let index">
@@ -71,4 +77,4 @@

{{ item.name }}

- + \ No newline at end of file diff --git a/frontend/src/app/list-tokens/list-tokens.page.html b/frontend/src/app/list-tokens/list-tokens.page.html index 362749da..f0f2310b 100644 --- a/frontend/src/app/list-tokens/list-tokens.page.html +++ b/frontend/src/app/list-tokens/list-tokens.page.html @@ -23,8 +23,8 @@
- @@ -42,7 +42,7 @@ # Name Ticker - Token Price + Token Price Minted diff --git a/frontend/src/app/list-tokens/list-tokens.page.ts b/frontend/src/app/list-tokens/list-tokens.page.ts index eb5122e2..93247666 100644 --- a/frontend/src/app/list-tokens/list-tokens.page.ts +++ b/frontend/src/app/list-tokens/list-tokens.page.ts @@ -11,6 +11,7 @@ import { TokenDecimalsPipe } from '../core/pipe/token-with-decimals.pipe'; import { ActivatedRoute, RouterLink } from '@angular/router'; import { TableModule } from 'primeng/table'; import { PriceService } from '../core/service/price.service'; +import { SortEvent } from 'primeng/api'; @Component({ selector: 'app-list-tokens', @@ -26,7 +27,7 @@ export class ListTokensPage implements OnInit { tokens: any = null; holdings: any = null; offset = 0; - limit = 500; + limit = 2000; lastFetchCount = 0; baseTokenPrice: number = 0; @@ -111,4 +112,39 @@ export class ListTokensPage implements OnInit { }); } + customSort(event: SortEvent) { + if (event.field == 'minted') { + event.data?.sort((data1, data2) => { + + let value1 = parseInt(data1["circulating_supply"]) / parseInt(data1["max_supply"]); + let value2 = parseInt(data2["circulating_supply"]) / parseInt(data2["max_supply"]); + let result = null; + + if (value1 == null && value2 != null) result = -1; + else if (value1 != null && value2 == null) result = 1; + else if (value1 == null && value2 == null) result = 0; + else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0; + + return event.order as number * result; + }); + + } + + event.data?.sort((data1, data2) => { + let value1 = data1[event.field as string]; + let value2 = data2[event.field as string]; + let result = null; + + if (value1 == null && value2 != null) result = -1; + else if (value1 != null && value2 == null) result = 1; + else if (value1 == null && value2 == null) result = 0; + else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2); + else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0; + + return event.order as number * result; + }); + } + + + } diff --git a/frontend/src/app/transfer-modal/transfer-modal.page.ts b/frontend/src/app/transfer-modal/transfer-modal.page.ts index a8ac0509..ec54ab6c 100644 --- a/frontend/src/app/transfer-modal/transfer-modal.page.ts +++ b/frontend/src/app/transfer-modal/transfer-modal.page.ts @@ -118,7 +118,7 @@ export class TransferModalPage implements OnInit { // Construct metaprotocol memo message const params = new Map([ ["tic", this.ticker], - ["amt", this.transferForm.value.basic.amount], + ["amt", this.transferForm.value.basic.amount.replace(/\s/g, '')], ["dst", this.transferForm.value.basic.destination], ]); const urn = this.protocolService.buildURN(environment.chain.chainId, 'transfer', params);