Skip to content

Commit

Permalink
fix PLA-1059
Browse files Browse the repository at this point in the history
  • Loading branch information
zlayine committed Dec 5, 2023
1 parent e45c74d commit 2400fe1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<Address :address="Royalty.getRoyaltyBeneficiary(item)" />

<dt class="text-sm font-medium text-gray-500">Percentage</dt>
<dd class="mt-1 text-sm text-gray-900">{{ Royalty.getRoyaltyPercentage(item) }}%</dd>
<dd class="mt-1 text-sm text-gray-900">{{ Royalty.getRoyaltyPercentage(item) * 100 }}%</dd>
</div>

<div class="space-y-2 pt-4 pb-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@
<dt class="text-base font-medium text-gray-500">State</dt>
<dd class="mt-1 text-sm text-gray-900">{{ transaction.state }}</dd>
</div>
<div class="space-y-2 pt-4 pb-3" v-if="transaction.result">
<div
class="space-y-2 pt-4 pb-3"
v-if="transaction.result && transaction.state === TransactionState.FINALIZED"
>
<dt class="text-base font-medium text-gray-500">Result</dt>
<dd class="mt-1 text-sm text-gray-900 font-bold">
<TransactionResultChip :text="transaction.result" />
Expand Down Expand Up @@ -114,6 +117,12 @@
v-if="isAddressKey(param.type) && param.value"
:address="`0x${param.value}`"
/>
<dd
v-else-if="param.type === 'percentage'"
class="mt-1 text-sm text-gray-900 break-words"
>
{{ param.value / 10000000 }}%
</dd>
<dd v-else class="mt-1 text-sm text-gray-900 break-words">
{{ param.value ?? '-' }}
</dd>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/util/royalty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class Royalty {

static getRoyaltyPercentage(item: any) {
if (item?.royalty?.percentage) {
return item.royalty.percentage * 100;
return item.royalty.percentage;
}

return 0;
Expand Down

0 comments on commit 2400fe1

Please sign in to comment.