Skip to content

Commit

Permalink
Merge branch 'master' into chore/sync-release
Browse files Browse the repository at this point in the history
  • Loading branch information
tuliomir committed Nov 13, 2024
2 parents 9631fc5 + a691738 commit a9243ad
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 8 deletions.
7 changes: 7 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ step0() {
echo - npm $(npm -v)
echo - python $(python --version | awk '{print $2}')
echo
git log -n1
echo

if grep "TEAM-ID-HERE" package.json >/dev/null; then
echo [ERROR] Team ID not in package.json.
exit -1
fi
}

step1() {
Expand Down
20 changes: 20 additions & 0 deletions shasum-sign.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
#
# Generate SHA256SUMS and SHA256SUMS.asc from the most recent build.
#

# Setting flags to fail early, strict variable usage and verbose output
set -e
set -u
set -x

rm -f ./dist/SHA256SUMS
rm -f ./dist/SHA256SUMS.asc

# remove spaces from all filenames
(cd ./dist && find . -maxdepth 1 -type f -iname "* *" -print0 | xargs -0 -I {} bash -c 'mv "$0" "${0// /.}"' {})

# generate SHA256SUMS
(cd ./dist && find . -type f -iname \*wallet\* -mmin -180 -maxdepth 1 | xargs -L1 basename | xargs shasum -a 256 > SHA256SUMS)

gpg -s --detach-sign -a -u 0x8DE497EA ./dist/SHA256SUMS
14 changes: 14 additions & 0 deletions src/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,7 @@ span.software {
.nc-detail-wrapper {
padding: 1rem;
border: 1px solid;
max-width: 100%;
}

.nc-detail-wrapper > hr {
Expand All @@ -906,6 +907,19 @@ span.software {
border-top: 1px solid;
}

.five-column-list {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 1rem;
list-style: none;
padding-left: 0;
}

.five-column-list li {
padding: 0.5rem;
text-align: center;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
Expand Down
4 changes: 2 additions & 2 deletions src/sagas/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ export function* loadTokens() {
//
// Note: We need to download the balance of all the tokens from the wallet so we can
// hide zero-balance tokens
for (const token of Object.keys(allTokens)) {
for (const token of allTokens) {
yield put(tokenFetchBalanceRequested(token));
}

Expand Down Expand Up @@ -708,7 +708,7 @@ export function* walletReloading() {

// We might have lost transactions during the reload, so we must invalidate the
// token histories:
for (const tokenUid of Object.keys(allTokens)) {
for (const tokenUid of allTokens) {
if (tokenUid === hathorLibConstants.NATIVE_TOKEN_UID) {
continue;
}
Expand Down
8 changes: 4 additions & 4 deletions src/screens/nano-contract/NanoContractDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@ function NanoContractDetail() {
method !== hathorLib.constants.NANO_CONTRACTS_INITIALIZE_METHOD
).map((method) => {
return (
<div key={method}>
<li key={method}>
<a href="true" onClick={(e) => executeMethod(e, method)}>{method}</a>
</div>
</li>
);
});
}
Expand All @@ -262,9 +262,9 @@ function NanoContractDetail() {
<hr />
<div>
<p className="text-center mb-4"><strong>Available methods:</strong></p>
<div className="d-flex flex-row justify-content-around mt-3">
<ul className="five-column-list mt-3">
{renderNanoMethods()}
</div>
</ul>
</div>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions src/utils/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ const wallet = {
},

/**
* Filters only the non-registered tokens from the allTokens list.
* Filters only the non-registered tokens from the allTokens object.
* Optionally filters only those with non-zero balance.
*
* @param {Object[]} allTokens list of all available tokens
* @param {Record<string, string>} allTokens object with tokenUid as key and value
* @param {Object[]} registeredTokens list of registered tokens
* @param {Object[]} tokensBalance data about token balances
* @param {boolean} hideZeroBalance If true, omits tokens with zero balance
Expand Down

0 comments on commit a9243ad

Please sign in to comment.