-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from stellar/release/1.0.0-rc2
Release 1.0.0-rc2 into main (SDP-864)
- Loading branch information
Showing
33 changed files
with
1,289 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: Bug report | ||
about: Tell us about a bug you found | ||
title: "" | ||
labels: bug | ||
assignees: "" | ||
--- | ||
|
||
<!-- Please answer these questions before submitting your issue. Thanks! --> | ||
|
||
### What version are you using? | ||
|
||
### What did you do? | ||
|
||
### What happened? | ||
|
||
### What did you expect to see instead? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
blank_issues_enabled: true | ||
contact_links: | ||
- name: Backend Project | ||
url: https://github.com/stellar/stellar-disbursement-platform-backend | ||
about: The backend API where this repository's application integrates with. | ||
- name: Stellar Laboratory | ||
url: https://laboratory.stellar.org/#?network=test | ||
about: The best place to experiment with the Stellar network. | ||
- name: Docker Images | ||
url: https://hub.docker.com/r/stellar/stellar-disbursement-platform-frontend | ||
about: Where to check the available Docker images that have been published. | ||
- name: Stellar Ecosystem Proposals (SEPs) | ||
url: https://github.com/stellar/stellar-protocol | ||
about: The SEPs implemented in this project are defined here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
name: Feature request | ||
about: Tell us what you'd like to see | ||
title: "Feature Request: " | ||
labels: "" | ||
assignees: "" | ||
--- | ||
|
||
<!-- Please answer these questions before submitting your issue. Thanks! --> | ||
|
||
### What problem does your feature solve? | ||
|
||
### What would you like to see? | ||
|
||
### What alternatives are there? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
name: Release a New Version! | ||
about: Prepare a release to be launched | ||
title: "" | ||
labels: release | ||
--- | ||
|
||
<!-- Please Follow this checklist before making your release. Thanks! --> | ||
|
||
## Release Checklist | ||
|
||
> Attention: the examples below use the version `x.y.z` but you should update | ||
> them to use the version you're releasing. | ||
### Git Preparation | ||
|
||
- [ ] Decide on a version number based on the current version number and the | ||
common rules defined in [Semantic Versioning](https://semver.org). E.g. | ||
`x.y.z`. | ||
- [ ] Update this ticket name to reflect the new version number, following the | ||
pattern "Release `x.y.z`". | ||
- [ ] Cut a branch for the new release out of the `develop` branch, following | ||
the gitflow naming pattern `release/x.y.z`. | ||
|
||
### Code Preparation | ||
|
||
- [ ] Update the project's version in [package.json] accordingly. | ||
- [ ] Update the [CHANGELOG.md] with the new version number and release notes. | ||
- [ ] Run tests and linting, and make sure the version running in the default | ||
branch is working end-to-end. At least the minimal end-to-end manual tests | ||
is mandatory. | ||
- [ ] 🚨 DO NOT RELEASE before holidays or weekends! Mondays and Tuesdays are | ||
preferred. | ||
|
||
### Merging the Branches | ||
|
||
> 🚨 ATTENTION: in the following steps, do `merge commits` and NOT | ||
> `squash-and-merge`! | ||
- [ ] When the team is confident the release is stable, you'll need to create | ||
two pull requests: | ||
- [ ] `release/x.y.z -> main`: This PR should be merged with a merge commit. | ||
- [ ] `release/x.y.z -> develop`: this should be merged after the `main` | ||
branch is merged. This PR should be merged with a merge commit. | ||
|
||
### Publishing the Release | ||
|
||
- [ ] After the release branch is merged to `main`, create a new release on | ||
GitHub with the name `x.y.z` and the use the same changes from the | ||
[CHANGELOG.md] file. | ||
- [ ] The release should automatically publish a new version of the docker | ||
image to Docker Hub. Double check if that happened. | ||
|
||
[package.json]: | ||
https://github.com/stellar/stellar-disbursement-platform-frontend/blob/develop/package.json | ||
[CHANGELOG.md]: | ||
https://github.com/stellar/stellar-disbursement-platform-frontend/blob/develop/CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,30 @@ | ||
# stellar-relief-backoffice | ||
# Stellar Disbursement Platform Frontend | ||
|
||
## Add `/public/settings/env-config.js` file locally with the following keys: | ||
## Introduction | ||
|
||
### SSO | ||
The Stellar Disbursement Platform (SDP) enables organizations to disburse bulk payments to recipients using Stellar. | ||
|
||
- USE_SSO - variable for switch to current/old Login or to SSO Login; | ||
- If you are going to use SSO - you need provide OIDC_REDIRECT_URI to specialist | ||
who will configure OIDC Provider and get from them OIDC_AUTHORITY, | ||
OIDC_CLIENT_ID, OIDC_SCOPE, OIDC_USERNAME_MAPPING; | ||
- OIDC_USERNAME_MAPPING - is using for show in web page in "username" field; | ||
- Options of OIDC_USERNAME_MAPPING you could find in ID Token body (in user | ||
claims) or in OIDC Provider configure page; | ||
- When you will switch to using SSO - it must be synchronously changed in | ||
BackEnd side - as in current moment its possible to use only tokens from one | ||
issuer; | ||
This repo contains the SDP dashboard UI, which is to be used with the [Stellar Disbursement Platform Backend](https://github.com/stellar/stellar-disbursement-platform-backend). For more information on how to get started, see the Stellar [dev docs](https://developers.stellar.org/docs/category/use-the-stellar-disbursement-platform) and [API reference](https://developers.stellar.org/api/stellar-disbursement-platform). | ||
|
||
The SDP's comprehensive dashboard includes the following pages: | ||
* Dashboard Home (Overview): Summary of recent disbursement activities and key metrics, including successful payment rate, total successful/failed/remaining payments, total disbursed, individuals, and wallets. | ||
* Disbursements Page (Management): Create, draft, search, filter, and export disbursements. Detailed disbursement page includes names, total payments, successes, failures, remaining, creation date, total amount, and disbursed amount. | ||
* Receivers Page (Overview): List of individuals set to receive payments, with wallet information and payment history. May also search, filter, and export receiver data in CSV. | ||
* Payments Page (Overview): Summary of all payments, including search by payment ID, filters, and export options. Payment detail includes Payment ID, wallet address, disbursement name, completion time, amount, and status information. | ||
* Wallets Page (Management): View Distribution Account information including public key, balance, adding funds, and more, and manage which assets you want to use on the Stellar network. | ||
* Analytics Page (Overview): Provides insights into financial transactions, including successful payment rate, total successful/failed/remaining payments, total disbursed, average amount, total amount per asset, and individuals and wallets involved. | ||
|
||
Feedback and contributions are welcome! | ||
|
||
### Config | ||
|
||
Make sure to set the following for initial local testing: | ||
|
||
```javascript | ||
window._env_ = { | ||
API_URL: "", | ||
STELLAR_EXPERT_URL: "", | ||
HORIZON_URL: "", | ||
USDC_ASSET_ISSUER: "", | ||
RECAPTCHA_SITE_KEY: "", | ||
|
||
USE_SSO: false, | ||
OIDC_AUTHORITY: | ||
"https://<tenant_name>.b2clogin.com/<tenant_name>.onmicrosoft.com/<policy_name>", | ||
OIDC_CLIENT_ID: "<client_id>", | ||
OIDC_REDIRECT_URI: "http://localhost:3000/signin-oidc", | ||
OIDC_SCOPE: "openid", | ||
OIDC_USERNAME_MAPPING: "name", | ||
}; | ||
API_URL: "https://localhost:8000", | ||
STELLAR_EXPERT_URL: "https://stellar.expert/explorer/testnet", | ||
HORIZON_URL: "https://horizon-testnet.stellar.org", | ||
RECAPTCHA_SITE_KEY: "6Lego1wmAAAAAJNwh6RoOrsHuWnsciCTIL3NN-bn", | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { handleApiResponse } from "api/handleApiResponse"; | ||
import { API_URL } from "constants/settings"; | ||
import { sanitizeObject } from "helpers/sanitizeObject"; | ||
|
||
export const patchProfilePassword = async ( | ||
token: string, | ||
fields: { | ||
currentPassword?: string; | ||
newPassword?: string; | ||
}, | ||
): Promise<{ message: string }> => { | ||
const fieldsToSubmit = sanitizeObject({ | ||
current_password: fields.currentPassword, | ||
new_password: fields.newPassword, | ||
}); | ||
|
||
if (Object.keys(fieldsToSubmit).length < 2) { | ||
throw Error( | ||
"Update profile password requires current password and new password.", | ||
); | ||
} | ||
|
||
const response = await fetch(`${API_URL}/profile/reset-password`, { | ||
method: "PATCH", | ||
headers: { | ||
Authorization: `Bearer ${token}`, | ||
}, | ||
body: JSON.stringify(fieldsToSubmit), | ||
}); | ||
|
||
return handleApiResponse(response); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { handleApiResponse } from "api/handleApiResponse"; | ||
import { API_URL } from "constants/settings"; | ||
import { sanitizeObject } from "helpers/sanitizeObject"; | ||
|
||
export const patchReceiverInfo = async ( | ||
token: string, | ||
receiverId: string, | ||
fields: { | ||
email: string; | ||
externalId: string; | ||
}, | ||
): Promise<{ message: string }> => { | ||
const fieldsToSubmit = sanitizeObject({ | ||
email: fields.email, | ||
external_id: fields.externalId, | ||
}); | ||
|
||
if (Object.keys(fieldsToSubmit).length === 0) { | ||
throw Error("Update receiver info requires at least one field to submit"); | ||
} | ||
|
||
const response = await fetch(`${API_URL}/receivers/${receiverId}`, { | ||
method: "PATCH", | ||
headers: { | ||
Authorization: `Bearer ${token}`, | ||
}, | ||
body: JSON.stringify(fieldsToSubmit), | ||
}); | ||
|
||
return handleApiResponse(response); | ||
}; |
Oops, something went wrong.