Skip to content

Commit

Permalink
Merge pull request #114 from Greenstand/v1
Browse files Browse the repository at this point in the history
Create PR before releasing to Prod
  • Loading branch information
OlhaD authored Feb 1, 2024
2 parents 551f615 + ed4b73c commit 467b1c5
Show file tree
Hide file tree
Showing 32 changed files with 2,049 additions and 475 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
env:
project-directory: ./
repository: 'Greenstand/treetracker-wallet-admin-client'
node-version: '18'
node-version: '20'

jobs:
prepare:
Expand All @@ -23,7 +23,7 @@ jobs:
steps:
- uses: actions/setup-node@v1
with:
node-version: '18.x'
node-version: '20.x'
- uses: actions/checkout@v2
- run: |
echo "::debug:: begin preparing...";
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
steps:
- uses: actions/setup-node@v1
with:
node-version: '18.x'
node-version: '20.x'
- uses: actions/checkout@v2
with:
# have to checkout master, to read releaserc, which means we must update the rc file in master with the newest settings
Expand Down Expand Up @@ -105,10 +105,10 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.version }}
- name: Use Node.js 18.x
- name: Use Node.js 20.x
uses: actions/setup-node@v1
with:
node-version: '18.x'
node-version: '20.x'
- name: npm clean install
run: npm ci --legacy-peer-deps
working-directory: ${{ env.project-directory }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/treetracker-wallet-admin-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

env:
project-directory: ./
node-version: '18'
node-version: '20'

jobs:
client:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
128 changes: 127 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,130 @@
## [1.0.2](https://github.com/Greenstand/treetracker-wallet-admin-client/compare/v1.0.1...v1.0.2) (2023-10-18)
# [1.1.0-v1.1](https://github.com/Greenstand/treetracker-wallet-admin-client/compare/v1.0.2...v1.1.0-v1.1) (2024-02-01)


### Bug Fixes

* fix sorting ([aa6f1ec](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/aa6f1eca1cd96fd5a6517a62a781c6d3803878ba))
* initiate merge ([f892c88](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/f892c88484d244b5f1e751aaa52f8aec919bf39d))
* pagination ([22520a7](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/22520a7dcda9dd38f834aa37d8690e7e1a6fb4d8))
* Semantic release node version upgrade ([0caf7e6](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/0caf7e6af953ba992a1548f47851366371e1ed91))
* show 'created date' column ([9aa0c4f](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/9aa0c4fbd8ede2a8b9a5182faf866c19c7d70451))
* test - Update README.md ([ed5ff74](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/ed5ff74bb34757b8a0f3153d00ab3168df351cbc))
* test merge 2 ([f87471a](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/f87471a1ca7b00ba59ba7c98331d051aa26d139d))
* Update README.md ([7003b68](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/7003b6890931c534b9d572e28e2be2d95d4f544e))


### Features

* add confirmation popup ([40d7d6b](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/40d7d6b40e0bb8628c6a478835ec2e2f0f1832af))
* add sorting icons; rename MyWallets table ([032c0df](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/032c0df745bd9fb0d4839563925c5508811b91ed))
* add sorting in wallets table ([957e8a6](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/957e8a65f63cd90e0f471936978b0a6c512e8a8b))
* add tests ([7636ffa](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/7636ffa0200152270b04bb7ab605a4ad48f31f23))
* connected with api ([448dd4a](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/448dd4a9741387e3f8e0f1dad5c9d8a83a77557f))
* create managed wallet basic dialog ([b177abe](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/b177abe0af4aace3128067d5185e87237c566f36))
* fix unit tests ([c04b87a](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/c04b87ab979eb30727ee4cbcc81687875385ca55))
* fixed functionality, added tests ([390f3ec](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/390f3ec0c8b9bfc4b0bd0145a48d05cd6efd072b))
* List wallets ([1e19080](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/1e1908022f19c28b31a4240f81fc938de0cd4ad3))
* refactor, remove unneeded text ([57fad61](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/57fad61777f64244c763b8548d00cd3d77f612c4))
* success message in dialog, updated tests ([d420f7a](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/d420f7a0a2837b52767251c0faa4a95003a3aa4f))

# [1.0.0-v1.32](https://github.com/Greenstand/treetracker-wallet-admin-client/compare/v1.0.0-v1.31...v1.0.0-v1.32) (2024-01-30)


### Features

* add sorting icons; rename MyWallets table ([032c0df](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/032c0df745bd9fb0d4839563925c5508811b91ed))

# [1.0.0-v1.31](https://github.com/Greenstand/treetracker-wallet-admin-client/compare/v1.0.0-v1.30...v1.0.0-v1.31) (2024-01-24)


### Bug Fixes

* Update README.md ([7003b68](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/7003b6890931c534b9d572e28e2be2d95d4f544e))


### Features

* add sorting in wallets table ([957e8a6](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/957e8a65f63cd90e0f471936978b0a6c512e8a8b))

# [1.0.0-v1.30](https://github.com/Greenstand/treetracker-wallet-admin-client/compare/v1.0.0-v1.29...v1.0.0-v1.30) (2024-01-24)


### Features

* success message in dialog, updated tests ([d420f7a](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/d420f7a0a2837b52767251c0faa4a95003a3aa4f))

# [1.0.0-v1.29](https://github.com/Greenstand/treetracker-wallet-admin-client/compare/v1.0.0-v1.28...v1.0.0-v1.29) (2024-01-17)


### Bug Fixes

* test - Update README.md ([ed5ff74](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/ed5ff74bb34757b8a0f3153d00ab3168df351cbc))

# [1.0.0-v1.28](https://github.com/Greenstand/treetracker-wallet-admin-client/compare/v1.0.0-v1.27...v1.0.0-v1.28) (2024-01-16)


### Bug Fixes

* Semantic release node version upgrade ([0caf7e6](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/0caf7e6af953ba992a1548f47851366371e1ed91))


### Features

* connected with api ([448dd4a](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/448dd4a9741387e3f8e0f1dad5c9d8a83a77557f))
* create managed wallet basic dialog ([b177abe](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/b177abe0af4aace3128067d5185e87237c566f36))
* fixed functionality, added tests ([390f3ec](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/390f3ec0c8b9bfc4b0bd0145a48d05cd6efd072b))
* refactor, remove unneeded text ([57fad61](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/57fad61777f64244c763b8548d00cd3d77f612c4))

# [1.0.0-v1.27](https://github.com/Greenstand/treetracker-wallet-admin-client/compare/v1.0.0-v1.26...v1.0.0-v1.27) (2024-01-09)


### Bug Fixes

* test merge 2 ([f87471a](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/f87471a1ca7b00ba59ba7c98331d051aa26d139d))

# [1.0.0-v1.26](https://github.com/Greenstand/treetracker-wallet-admin-client/compare/v1.0.0-v1.25...v1.0.0-v1.26) (2024-01-09)


### Bug Fixes

* initiate merge ([f892c88](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/f892c88484d244b5f1e751aaa52f8aec919bf39d))

# [1.0.0-v1.25](https://github.com/Greenstand/treetracker-wallet-admin-client/compare/v1.0.0-v1.24...v1.0.0-v1.25) (2023-12-31)


### Bug Fixes

* fix sorting ([aa6f1ec](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/aa6f1eca1cd96fd5a6517a62a781c6d3803878ba))
* pagination ([22520a7](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/22520a7dcda9dd38f834aa37d8690e7e1a6fb4d8))
* show 'created date' column ([9aa0c4f](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/9aa0c4fbd8ede2a8b9a5182faf866c19c7d70451))


### Features

* add tests ([7636ffa](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/7636ffa0200152270b04bb7ab605a4ad48f31f23))
* fix unit tests ([c04b87a](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/c04b87ab979eb30727ee4cbcc81687875385ca55))
* List wallets ([1e19080](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/1e1908022f19c28b31a4240f81fc938de0cd4ad3))

# [1.0.0-v1.24](https://github.com/Greenstand/treetracker-wallet-admin-client/compare/v1.0.0-v1.23...v1.0.0-v1.24) (2023-12-27)


### Bug Fixes

* minor change for the deployment [skip ci] ([40a139e](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/40a139e873a593b3567bdbbbfad7dfa0d0a5a97e))


### Features

* add confirmation popup ([40d7d6b](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/40d7d6b40e0bb8628c6a478835ec2e2f0f1832af))

# [1.0.0-v1.23](https://github.com/Greenstand/treetracker-wallet-admin-client/compare/v1.0.0-v1.22...v1.0.0-v1.23) (2023-09-27)


### Features

* add API Key and fix tests ([9c43938](https://github.com/Greenstand/treetracker-wallet-admin-client/commit/9c43938ea4dff7ce17f514acd5fcd85a9b6bae16))

# [1.0.0-v1.22](https://github.com/Greenstand/treetracker-wallet-admin-client/compare/v1.0.0-v1.21...v1.0.0-v1.22) (2023-08-25)


### Bug Fixes
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

The admin panel for accessing wallets and executing all known API calls for the wallet API.

## Product Leadership:
## Product Leadership

Product Engineering and Technical Lead: @OlhaD

Project Manager: @Steve

Repository wrangler: (add your name here)

Core Contributors: (add your name here
Core Contributors: (add your name here)

## Background

The wallet admin panel is used by wallet owners to display, transfer token and transactions, create sub wallets and
The wallet admin panel is used by wallet owners to display, transfer tokens and transactions, create sub wallets and
configure their appearance.

## Use case
Expand Down Expand Up @@ -93,4 +93,5 @@ practices
and open reforestation to the digital world.

Come have fun with a global team and a project that is disrupting opaque practices and creating open reforestation to the digital world.
More on getting started and [Contributing to the Cause](https://github.com/Greenstand/Greenstand-Overview#contributing-to-the-cause)

More on getting started and [Contributing to the Cause](https://github.com/Greenstand/Greenstand-Overview#contributing-to-the-cause).
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "treetracker-wallet-admin-client",
"version": "1.0.2",
"version": "1.1.0-v1.1",
"private": true,
"dependencies": {
"@emotion/react": "^11.10.6",
Expand Down Expand Up @@ -65,7 +65,7 @@
"semantic-release": "^22.0.5"
},
"engines": {
"node": ">= 18 < 19"
"node": ">= 20 < 21"
},
"jest": {
"transformIgnorePatterns": [
Expand Down
43 changes: 32 additions & 11 deletions src/api/wallets.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,26 @@ const mapWallet = (walletData, nameProp) => {
tokensInWallet: walletData.tokens_in_wallet,
name: walletData[nameProp],
about: walletData.about,
//createdDate: walletData.created_at,
created_at: walletData.created_at,
};
};

export const getWallets = async (token, name = '', pageNumber = 1) => {
const params = {
offset: pageNumber - 1,
};

if (name) {
params.name = name;
}

export const getWallets = async (
token,
name = '',
{ pagination } = { pagination: { offset: 0, limit: 10 } },
{ sorting } = { sorting: { sortBy: 'created_at', order: 'desc' } }
) => {
const { total, wallets } = await apiClient
.setAuthHeader(token)
.get('/wallets', {
params: {
name: name || undefined, // Pass 'name' if it exists, or pass 'undefined' to exclude it
offset: pageNumber - 1,
offset: pagination.offset,
limit: pagination.limit,
sort_by: sorting.sortBy,
order: sorting.order,
},
})
.then((response) => {
Expand Down Expand Up @@ -61,4 +63,23 @@ export const getWalletById = async (token, id) => {
});

return walletData;
};
};

export const createWallet = async (token, walletName) => {
const postRequest = {
wallet: walletName,
};

const createdWallet = await apiClient
.setAuthHeader(token)
.post('/wallets', postRequest)
.then((response) => {
return response.data;
})
.catch((error) => {
console.error(error);
throw Error(error.response.data.message);
});

return createdWallet;
};
Loading

0 comments on commit 467b1c5

Please sign in to comment.