Skip to content

Commit

Permalink
v1.0.2-RC1 (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
MButcho authored Jan 9, 2021
1 parent 90449ad commit e23be9c
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 60 deletions.
16 changes: 8 additions & 8 deletions docs/build-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@ npm run dist-linux;


## Checksum:
1.0.1
1.0.2-RC1

windows:

openssl dgst -sha512 -binary Elastos-Light-Wallet-Setup-1.0.1.exe | openssl base64 -A
openssl dgst -sha512 -binary Elastos-Light-Wallet-Setup-1.0.2-RC1.exe | openssl base64 -A

xxxx

Ubuntu 18:

openssl sha -sha512 Elastos-Light-Wallet-1.0.1.AppImage
openssl sha -sha512 Elastos-Light-Wallet-1.0.2-RC1.AppImage

xxxx

Mac:

openssl dgst -sha512 Elastos-Light-Wallet-1.0.1.dmg
openssl dgst -sha512 Elastos-Light-Wallet-1.0.2-RC1.dmg

xxxx

Expand All @@ -77,13 +77,13 @@ npm ls node-gyp


# to auto build a releases
git commit -am v1.0.1;
git tag v1.0.1;
git commit -am v1.0.2-RC1;
git tag v1.0.2-RC1;
git push;
git push --tags;

## to delete release tags
git push --delete origin v1.0.1;
git tag -d v1.0.1;
git push --delete origin v1.0.2-RC1;
git tag -d v1.0.2-RC1;
git pull;
git push;
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "elastos-light-wallet",
"version": "v1.0.1",
"version": "v1.0.2-RC1",
"description": "elastos light wallet",
"productName": "Elastos Light Wallet",
"main": "index.js",
Expand Down Expand Up @@ -36,7 +36,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/cyber-republic/elastos-light-wallet.git"
"url": "git+https://github.com/MButcho/elastos-light-wallet.git"
},
"keywords": [
"elastos"
Expand Down
24 changes: 18 additions & 6 deletions scripts/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ let unspentTransactionOutputsStatus = 'No UTXOs Requested Yet';
const parsedUnspentTransactionOutputs = [];
let selectedUTXOs = [];
let customUTXOs = false;
let balanceChange = false;

let blockchainStatus = 'No Blockchain State Requested Yet';

Expand Down Expand Up @@ -583,6 +584,7 @@ const getUnspentTransactionOutputsReadyCallback = (response) => {
parsedUnspentTransactionOutputs.push(utxo);
});
}

renderApp();
};

Expand All @@ -605,7 +607,6 @@ const requestBlockchainData = (_userRequest) => {
requestBalance();
requestUnspentTransactionOutputs();
requestBlockchainState();
clearUTXOsSelection();

CoinGecko.requestPriceData();

Expand Down Expand Up @@ -935,6 +936,7 @@ const sendAmountToAddressReadyCallback = (transactionJson) => {
requestTransactionHistory();
GuiToggles.showAllBanners(true);
clearSendData();
clearUTXOsSelection();
setSendStep(1);
}
renderApp();
Expand Down Expand Up @@ -1705,6 +1707,7 @@ const sendVoteReadyCallback = (transactionJson) => {
requestTransactionHistory();
GuiToggles.showAllBanners(true);
clearSendData();
clearUTXOsSelection();
}
renderApp();
};
Expand Down Expand Up @@ -1829,9 +1832,18 @@ const getBalanceErrorCallback = (response) => {
};

const getBalanceReadyCallback = (balanceResponse) => {
let lastBalance = balance;
if (balanceResponse.Error == 0) {
balanceStatus = `Balance Received.`;
balance = balanceResponse.Result;
if (lastBalance !== balance) {
balanceChange = true;
if (customUTXOs) {
clearUTXOsSelection();
}
} else {
balanceChange = false;
}
} else {
//balanceStatus = `Balance Received Error:${balanceResponse.Error}`;
balanceStatus = `Error receiving balance`;
Expand Down Expand Up @@ -2909,7 +2921,7 @@ const getMaxCandidates = () => {
return maxCandidates;
}

const toggleUTXOSelection = (_item) => {
const toggleUTXOControl = (_item) => {
const selectUTXO = parsedUnspentTransactionOutputs[_item.index];
if (!checkUTXO(selectUTXO.utxoIx)) {
//console.log(JSON.stringify(selectUTXO));
Expand All @@ -2921,7 +2933,7 @@ const toggleUTXOSelection = (_item) => {
}
}
}
// mainConsole.log('toggleUTXOSelection selectedUTXOs, count', selectedUTXOs, selectedUTXOs.length);
// mainConsole.log('toggleUTXOControl selectedUTXOs, count', selectedUTXOs, selectedUTXOs.length);
renderApp();
};

Expand All @@ -2938,13 +2950,13 @@ const validateUTXOsSelection = () => {
return false;
}

if (selectedUTXOs.length === 0) {
/*if (selectedUTXOs.length === 0) {
bannerStatus = 'You have not selected any UTXOs, please select at least 1.';
bannerClass = 'bg_red color_white banner-look';
GuiToggles.showAllBanners(false);
renderApp();
return false;
}
}*/
return true;
}

Expand Down Expand Up @@ -3128,7 +3140,7 @@ exports.getVoteValue = getVoteValue;
exports.getMaxCandidates = getMaxCandidates;
exports.enableContextMenu = enableContextMenu;
exports.disableContextMenu = disableContextMenu;
exports.toggleUTXOSelection = toggleUTXOSelection;
exports.toggleUTXOControl = toggleUTXOControl;
exports.getAllUTXOs = getAllUTXOs;
exports.getSelectedUTXOs = getSelectedUTXOs;
exports.checkUTXO = checkUTXO;
Expand Down
41 changes: 36 additions & 5 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -975,12 +975,24 @@ button {
width: 93%;
}

.utxo-selection {
.utxo-status {
position: absolute;
top: 31px;
left: 478px;
}

.utxo-status-font {
opacity: 0.9;
font-size: 16px;
color: #B2B4C3;
letter-spacing: 0;
line-height: 17px;
}

.utxo-status-font-max {
font-size: 11px;
}

.utxo-tablediv {
position: absolute;
top: 75px;
Expand Down Expand Up @@ -1044,16 +1056,35 @@ button {
position: relative;
}

.utxo-custom-text-grey {
font-family: 'Open Sans', sans-serif;
opacity: 0.9;
font-size: 12px;
font-weight: 100;
letter-spacing: 0;
color: #B2B4C3;
}

.utxo-custom-text-home {
position: absolute;
top: 419px;
left: 510px;
top: 416px;
left: 480px;
}

.utxo-custom-text-voting {
position: absolute;
top: 461px;
left: 755px;
top: 460px;
left: 706px;
}

.utxo-control-button {
height: 26px;
font-size: 12px;
background: none;
letter-spacing: 0;
padding: 5px 8px 5px 8px;
border-radius: 5px;
border: 0;
}

.dark-font {
Expand Down
4 changes: 2 additions & 2 deletions views/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ class AppView extends React.Component {
if (Home.showUTXOs) {
Home.closeModal();
} else {
Home.UTXOSelection();
Home.UTXOControl();
}
break;
case "voting":
if (Voting.showUTXOs) {
Voting.closeModal();
} else {
Voting.UTXOSelection();
Voting.UTXOControl();
}
break;
default:
Expand Down
28 changes: 12 additions & 16 deletions views/home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ module.exports = (props) => {
if (isSent) {
closeModal();
}
App.clearUTXOsSelection();
App.renderApp();
}

Expand All @@ -79,7 +78,6 @@ module.exports = (props) => {
if (isSent) {
closeModal();
}
App.clearUTXOsSelection();
App.renderApp();
}

Expand Down Expand Up @@ -167,23 +165,20 @@ module.exports = (props) => {
App.renderApp();
}

const UTXOSelection = () => {
const UTXOControl = () => {
showUTXOs = true;
App.renderApp();
}

const UTXOSelectionNext = () => {
const UTXOControlNext = () => {
let isValid = App.validateUTXOsSelection();
if (isValid) {
closeModal();
App.setCustomUTXOs(true);
/*if (consolidateTxType) {
if (App.getPasswordFlag()) {
showConsolidateModal();
} else {
consolidateUTXOs();
}
}*/
if (App.getSelectedUTXOs().length > 0) {
App.setCustomUTXOs(true);
} else {
App.setCustomUTXOs(false);
}
}
}

Expand All @@ -206,7 +201,7 @@ module.exports = (props) => {
module.exports.closeModal = closeModal;
module.exports.resetPage = resetPage;
module.exports.cancelSend = cancelSend;
module.exports.UTXOSelection = UTXOSelection;
module.exports.UTXOControl = UTXOControl;

const SendScreenOne = (props) => {
const visibility = props.visibility;
Expand All @@ -226,8 +221,7 @@ module.exports = (props) => {
<input tabIndex="3" type="text" size="5" maxLength={5} id="feeAmount" placeholder="Fees" defaultValue={App.getFee()} onChange={(e) => writeSendData()} onFocus={(e) => autoFocusOn(e)} onBlur={(e) => autoFocusOff(e)} autoFocus={autoFocus === 3 ? true : false}/>
<div className="fees-text">Fees (in Satoshi ELA)</div>
<button tabIndex="4" className="next-button scale-hover" onClick={(e) => showConfirmAndSeeFees()}><p>Next</p></button>
<button style={App.showConsolidateButton() ? {display: 'block'} : {display: 'none'}} className="consolidate-button dark-hover cursor_def" title={consolidateTitle} onClick={(App.getPasswordFlag()) ? (e) => showConsolidateModal() : (e) => consolidateUTXOs()}>Consolidate ({consolidesCount})<img src="artwork/arrow.svg" alt="" className="arrow-forward"/></button>
<div style={App.getCustomUTXOs() ? {display: 'block'} : {display: 'none'}} className="utxo-custom-text-home utxo-custom-text" title="Update selected UTXOs by CTRL+u or CMD+u">Selected UTXOs ({App.getSelectedUTXOs().length}/{App.getTotalUTXOs()})</div>
<button tabIndex="5" style={App.showConsolidateButton() ? {display: 'block'} : {display: 'none'}} className="consolidate-button dark-hover cursor_def" title={consolidateTitle} onClick={(App.getPasswordFlag()) ? (e) => showConsolidateModal() : (e) => consolidateUTXOs()}>Consolidate ({consolidesCount})<img src="artwork/arrow.svg" alt="" className="arrow-forward"/></button>
</div>);
}

Expand Down Expand Up @@ -417,7 +411,9 @@ module.exports = (props) => {
</div>
</div>

<UTXOsSelection App={App} showUTXOs={showUTXOs} closeModal={closeModal} UTXOSelection={UTXOSelection} UTXOSelectionNext={UTXOSelectionNext}/>
<button tabIndex="6" style={(App.getCurrentAdvancedFeatures() || App.getCustomUTXOs()) ? {display: 'block'} : {display: 'none'}} className={App.getCustomUTXOs() ? "utxo-control-button utxo-custom-text-home utxo-custom-text dark-hover cursor_def" : "utxo-control-button utxo-custom-text-home utxo-custom-text-grey dark-hover cursor_def"} title="Update selected UTXOs by CTRL+u or CMD+u" onClick={(e) => UTXOControl()}>UTXO Control ({App.getCustomUTXOs() ? App.getSelectedUTXOs().length+"/"+App.getTotalUTXOs() : "ALL"} selected)</button>
{/*<div style={App.getCustomUTXOs() ? {display: 'block'} : {display: 'none'}} className="utxo-custom-text-home utxo-custom-text" title="Update selected UTXOs by CTRL+u or CMD+u"></div>*/}
<UTXOsSelection App={App} showUTXOs={showUTXOs} closeModal={closeModal} UTXOControl={UTXOControl} UTXOControlNext={UTXOControlNext}/>

<div className="bg-modal w400px h200px" style={showPasswordModal ? {display: 'flex'} : {display: 'none'}}>
<a onClick={(e) => closeModal()}></a>
Expand Down
16 changes: 8 additions & 8 deletions views/partial/utxos.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ module.exports = (props) => {
const App = props.App;
showUTXOs = props.showUTXOs;
const closeModal = props.closeModal;
const UTXOSelection = props.UTXOSelection;
const UTXOSelectionNext = props.UTXOSelectionNext;
const UTXOControl = props.UTXOControl;
const UTXOControlNext = props.UTXOControlNext;

const UTXOSelectionButtonText = (props) => {
const UTXOControlButtonText = (props) => {
const item = props.item;
if (App.checkUTXO(item.utxoIx)) {
return (<img src="artwork/check-square.svg" />)
Expand All @@ -23,9 +23,9 @@ module.exports = (props) => {
<a onClick={(e) => closeModal()}></a>
<div className="modalContent w550px h350px">
<div className="utxo-title">
<span className="address-text font_size20 gradient-font">UTXOs Selection</span>
<span className="address-text font_size20 gradient-font">UTXO Control</span>
</div>
<div className="utxo-selection status-font">{App.getSelectedUTXOs().length}/{App.getMaxUTXOsPerTX()}</div>
<div className="utxo-status utxo-status-font">{App.getSelectedUTXOs().length}/{App.getTotalUTXOs()}<br /><span className="utxo-status-font-max">max. {App.getMaxUTXOsPerTX()}</span></div>
<div className="closeModal" onClick={(e) => closeModal()}>
<img className="scale-hover" src="artwork/voting-back.svg" height="38px" width="38px"/>
</div>
Expand All @@ -40,12 +40,12 @@ module.exports = (props) => {
</tr>
{
App.getAllUTXOs().slice(0, App.getAllUTXOs().count).map((item, index) => {
return (<tr className={App.checkUTXO(index) ? 'txtable-row voting-selected ': 'txtable-row voting-hover'} key={index} onClick={(e) => App.toggleUTXOSelection({index})}>
return (<tr className={App.checkUTXO(index) ? 'txtable-row voting-selected ': 'txtable-row voting-hover'} key={index} onClick={(e) => App.toggleUTXOControl({index})}>
<td>{item.utxoIx}</td>
<td>{item.Txid.substring(0, 15) + '...'}</td>
<td>{item.Value}</td>
<td>
<UTXOSelectionButtonText item={item}/>
<UTXOControlButtonText item={item}/>
</td>
</tr>)
})
Expand All @@ -56,7 +56,7 @@ module.exports = (props) => {
<div className="utxo-footer">
<button className='utxo-clear utxo-grey-button scale-hover' title='Clear Selection' onClick={() => App.clearUTXOsSelection()}>Clear Selection</button>
<button className='utxo-max-select utxo-grey-button scale-hover' title='Select Max UTXOs' onClick={() => App.selectMaxUTXOs()}>Select Max</button>
<button className="utxo-confirm submitModal scale-hover" onClick={() => UTXOSelectionNext()}>Save</button>
<button className="utxo-confirm submitModal scale-hover" onClick={() => UTXOControlNext()}>Save</button>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion views/settings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ module.exports = (props) => {
</td>
</tr>
<tr className="settingsTableRow">
<td colSpan="2" className="settingCol1 p28R" title="Derivation path selection, ...">Advanced features:
<td colSpan="2" className="settingCol1 p28R" title="Derivation path selection, UTXO Control, ...">Advanced features:
</td>
<td className="settingCol3">
<label className="m10L switch">
Expand Down
Loading

0 comments on commit e23be9c

Please sign in to comment.