Skip to content

Commit

Permalink
Merge pull request #331 from xuhcc/display-amount-fix
Browse files Browse the repository at this point in the history
Fixes & improvements
  • Loading branch information
xuhcc authored Apr 8, 2021
2 parents 99c264f + 7272815 commit e57b0d5
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
14 changes: 13 additions & 1 deletion vue-app/src/utils/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,19 @@ export async function waitForTransaction(
throw new Error(error.message)
}
onTransactionHash(transaction.hash)
const transactionReceipt = await transaction.wait()
let transactionReceipt
while (!transactionReceipt) {
try {
transactionReceipt = await transaction.wait()
} catch (receiptError) {
const errorMessage = receiptError.data?.message || ''
if (errorMessage.includes('Block information is incomplete')) {
console.warn('Failed to get receipt, retrying...') /* eslint-disable-line no-console */
} else {
throw receiptError
}
}
}
if (transactionReceipt.status !== 1) {
throw new Error('Transaction failed')
}
Expand Down
8 changes: 7 additions & 1 deletion vue-app/src/views/Project.vue
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export default class ProjectView extends Vue {
}
get descriptionHtml(): string {
return markdown.renderInline(this.project?.description || '')
return markdown.render(this.project?.description || '')
}
}
</script>
Expand Down Expand Up @@ -347,5 +347,11 @@ export default class ProjectView extends Vue {
font-size: 20px;
line-height: 30px;
word-wrap: break-word;
::v-deep {
&:first-child {
margin-top: 0;
}
}
}
</style>
2 changes: 1 addition & 1 deletion vue-app/src/views/ProjectList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export default class ProjectList extends Vue {
}
formatFractionalPart(value: FixedNumber): string {
return value._value === '0.0' ? '' : value.toString().split('.')[1]
return value._value === '0.0' ? '' : value.round(2).toString().split('.')[1]
}
formatDate(value: DateTime): string {
Expand Down
8 changes: 7 additions & 1 deletion vue-app/src/views/RecipientRegistry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default class RecipientRegistryView extends Vue {
}
renderDescription(request: Request): string {
return markdown.renderInline(request.metadata.description)
return markdown.render(request.metadata.description)
}
isPending(request: Request): boolean {
Expand Down Expand Up @@ -233,6 +233,12 @@ h2 {
vertical-align: middle;
}
.project-description ::v-deep {
p, ul, ol {
margin: 10px 0;
}
}
.project-details {
margin-top: 10px;
}
Expand Down

0 comments on commit e57b0d5

Please sign in to comment.