Repository
https://github.com/nirvanaitsolutions/swapsteem
Bug Fixes
- What was the issue(s)?
In the prevoius UI, the user had to wait for 10 seconds before being edirected to our web app after a steemconnect sign transaction. It could be resolved using a simple feature provided by steemconnect, - What was the solution?
I addedauto_return=1
to the steemconnect url to enable instant redirect as soon as a steemconnect transaction is signed.
New Features
- What feature(s) did you add?
Implemented Review feature once the steem amount is released.
- How did you implement it/them?
To implement the feature requested, first I had to create new fields in Order and Profile Components for trade reviews.
<h2 mat-dialog-title>Review</h2>
review works! <form (ngSubmit)="submitReview(form)" novalidate #form="ngForm">
</p> <mat-dialog-content class="mat-typography">
<div class="rating-box">
<div>
<strong>
Rate *
</strong>
</div>
<div>
<bar-rating name="rating" [(ngModel)]="reviewData.review_score" [max]="5" required></bar-rating>
</div>
</div>
<mat-form-field>
<textarea matInput #message maxlength="500" name="review_text" placeholder="Please enter your review" [(ngModel)]="reviewData.review_text">
</textarea>
<mat-hint align="end">{{message.value.length}} / 500</mat-hint>
</mat-form-field>
</mat-dialog-content>
<mat-dialog-actions align="end">
<button mat-button mat-dialog-close>Cancel</button>
<button mat-button type="submit" cdkFocusInitial>Submit</button>
</mat-dialog-actions>
</form>
This way we are getting the user reviews and send them to the api as shown below.
submitReview(form) {
if (form.valid) {
this.ngxService.start();
this.apiService.createReview(Object.assign({}, this.reviewData, this.data)).subscribe((res) => {
this.ngxService.stop();
this.dialogRef.close(res);
})
}
}
This process is repeated for the Buyer after seller Review.
After the Review You will be shown a confirmation of the trade as shown below.
Additional libraries used
- MatInputModule,
- MatDialogModule,
- MatButtonModule,
- BarRatingModule,
- MatFormFieldModule,
- MatProgressSpinnerModule
Related Merged PRs
- Added auto_return=1 in steemconnect urls
- Implement review feature after escrow release
- Add buyer review in data base and update order status
It's great to see you are actively working on improving Swapsteem and adding needed features, like the ability to leave a review!
A couple of things about the code:
res[0]
,res[1]
,data[1]
etc., which is pretty confusing for someone like me who doesn't know much about your code base. Idk if that could be made more readable somehow, but if it can, then definitely think about it.Other than that I don't really have much to say other than keep up the great work!
Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post, click here.
Need help? Chat with us on Discord.
[utopian-moderator]
Hey @amosbastian, Thanks for these suggestions. I will more take care about these points next time.
Posted using Partiko Android
Thank you for your review, @amosbastian! Keep up the good work!
✅ Enjoy the vote! For more amazing content, please follow @themadcurator for a chance to receive more free votes!
Thank you @svijay1692 for your contribution. We are looking forward to have more support to @swapsteem.
Keep Rocking!
Posted using Partiko Android
Hi @svijay1692!
Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server
Congratulations @svijay1692! You've received the third place upvote this week :)
Thanks for participating in the Seeking Open-Source Projects contest! If you haven't already. Swing by our Discord and say hello https://discord.gg/MacHHF9