Skip to content
This repository has been archived by the owner on May 12, 2020. It is now read-only.

Commit

Permalink
Merge pull request #101 from Telos-Foundation/rc5.5
Browse files Browse the repository at this point in the history
Support for multiple clauses in ratification/amend proposals
  • Loading branch information
barchef authored Jun 28, 2019
2 parents 8e9e867 + 050cac5 commit 84e4a8c
Show file tree
Hide file tree
Showing 17 changed files with 135 additions and 102 deletions.
70 changes: 35 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@

### Releases

Current 1.0.7 release downloads:
Current 1.0.8 release downloads:

- [Windows Installer](https://github.com/Telos-Foundation/Sqrl/releases/download/1.0.7/win-Sqrl-1.0.7.exe)
- [macOS Package](https://github.com/Telos-Foundation/Sqrl/releases/download/1.0.7/mac-Sqrl-1.0.7.dmg)
- [Linux (src)](https://github.com/Telos-Foundation/Sqrl/archive/1.0.7.tar.gz)
- [Windows Installer](https://github.com/Telos-Foundation/Sqrl/releases/download/1.0.8/win-Sqrl-1.0.8.exe)
- [macOS Package](https://github.com/Telos-Foundation/Sqrl/releases/download/1.0.8/mac-Sqrl-1.0.8.dmg)
- [Linux (src)](https://github.com/Telos-Foundation/Sqrl/archive/1.0.8.tar.gz)

The latest release will always be available on the releases page of this repository:

Expand Down Expand Up @@ -117,40 +117,40 @@ Signed by [eosmiami on keybase](https://keybase.io/eosmiami)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
shasum -b -a 512 linux-Sqrl-1.0.7-amd64.deb
3d9fd88470a642038cbf4f1d3fdbbf68c7f5d163110b8acce71410220afaf8f45130e3b27a65c01b8d8fd19d5e1ea0406a97dc98f9683c383aa1ad138f158148 *linux-Sqrl-1.0.7-amd64.deb
shasum -b -a 512 linux-Sqrl-1.0.7-amd64.snap
185e35eaa9fb80dd4f2d8538381751bd6ee347630e612a81c35151b0f83acf74d137ac7095dd84307b24adf72787f6eee4f206c43a13365cec12b87de4344ee7 *linux-Sqrl-1.0.7-amd64.snap
shasum -b -a 512 linux-Sqrl-1.0.7-arm64.deb
16c923f3a08f00d543ce2146eca3f51cf65666837f4addbd26c127a3a25c2058e40795f4db09319e6e0bedbd568e141cc080901626930b7b1475e30b9d2d2e64 *linux-Sqrl-1.0.7-arm64.deb
shasum -b -a 512 linux-Sqrl-1.0.7-armv7l.deb
8be48c8b3e2073de5308cf0c0b30d141557a5e96686d19bd6309a1b7551af9e6c0c1170a9de8025df9a72228d3af9082c364b4a975eebf0c48763fe6d812bd39 *linux-Sqrl-1.0.7-armv7l.deb
shasum -b -a 512 linux-Sqrl-1.0.7-i386.deb
29fc14d6e8adb5fa549ee4ab43d0b1daea5fd95c813700240d8ffce11ef8b1066aa286781eb619470f57adde75a79155101b71d54cf5b98774649d12ffa7b147 *linux-Sqrl-1.0.7-i386.deb
shasum -b -a 512 linux-Sqrl-1.0.7-x86_64.AppImage
42dd39728c9b853dc64b42a44e59af52325a5de4e7fc24ceebf97c8fca627ca1ed0701e86aaeaac476eb3f84be1856bc672bc21997a86cb12265abec95c866df *linux-Sqrl-1.0.7-x86_64.AppImage
shasum -b -a 512 mac-Sqrl-1.0.7.dmg
1d1006d0e395061fd53d38b74852f73552879a241a18fa22359d500047c5fa0aa0988519d63064b58f488111af5976a2fd42f07e14f3b0428301b2364a1f8643 *mac-Sqrl-1.0.7.dmg
shasum -b -a 512 mac-Sqrl-1.0.7.zip
556beee367d5eb736810ae29a07ce67b5be6b83dd0548b41790a4ca27239e3ceb1181f343166f0fea04d3a119556f0bbbd4839145b93bc27cc48c97da08d3434 *mac-Sqrl-1.0.7.zip
shasum -b -a 512 win-Sqrl-1.0.7.exe
a767b0339d801b019cb8cc739158109a906b7ece9d177e1546262d89699fb4e16205fe97f1d6f4b2ebbf3d5a3da21439da05d618ac7f8ae99ae81de9ecb929cd *win-Sqrl-1.0.7.exe
shasum -b -a 512 linux-Sqrl-1.0.8-amd64.deb
200b9a1b491323e4ff10d4d4bdf26bf0b88c47d329fdb86670a0bf1098979f26e8557ad9b66c0c2bc79592a91241650f74825ac0523996965490bb572cf27e9d *linux-Sqrl-1.0.8-amd64.deb
shasum -b -a 512 linux-Sqrl-1.0.8-amd64.snap
da4f4dca6ad92776adae0b79df71384af244fe2582c12c11cb03649acbf7f3a0fb62963064cc226366c85d7471cb7d993cd1f524f89e9107c1f3827ac80ba88e *linux-Sqrl-1.0.8-amd64.snap
shasum -b -a 512 linux-Sqrl-1.0.8-arm64.deb
bf521957f022e9dffe8e49718ee30c08de755d449c20415437f06269be58428592dcb3b2c55983ba04fc97e680fe56eb285c10c9bef235041baf8bf668aa21fe *linux-Sqrl-1.0.8-arm64.deb
shasum -b -a 512 linux-Sqrl-1.0.8-armv7l.deb
db1ece84d768a9a72696926c6d699554f7aab282c376cc9796fa917d9dd2c3c735b89e3a8a0f460d03cc4540a9c01162c30e44a5dcb2d37be26857fa36a0dc3f *linux-Sqrl-1.0.8-armv7l.deb
shasum -b -a 512 linux-Sqrl-1.0.8-i386.deb
3d7c6a871eceea0f704a3c72c2f34034a1e89fed2bd5875668c248a5753c14ea888f052b8b7484042d24dc595b6d54aa3ca61e983ca05b8e3dd10291134b40fa *linux-Sqrl-1.0.8-i386.deb
shasum -b -a 512 linux-Sqrl-1.0.8-x86_64.AppImage
20db6e9643d95004d9009a5ed786a4b62115c36042d238b3eef415bbc7ff78c38839e9d634f70acae5bc3e911599d51569d99ee683e42a4c0fb37d2150e33be6 *linux-Sqrl-1.0.8-x86_64.AppImage
shasum -b -a 512 mac-Sqrl-1.0.8.dmg
0f943fd908a4114c5dcad0717210998b2b5d367848612e5d61c5e9c07bd9ee4dc376533ce7bd315cbc964941d792a98ea0c03a6bfd4f5c95de6d403d6b090f2b *mac-Sqrl-1.0.8.dmg
shasum -b -a 512 mac-Sqrl-1.0.8.zip
0ee4b016908c806563384240d36dee6344d7ded114c5b589e09e128d4e81845905d9b25dc9f4a2e56d78503f9a03f4cdb37253ac943976a33d5c97b66622c852 *mac-Sqrl-1.0.8.zip
shasum -b -a 512 win-Sqrl-1.0.8.exe
674677534ebdce7bb290b726df8b4121e2134f34287079b847d5a0f2a50f53ac609e16cff31fc1f8127820c42574fc212a14cff1e931f561fa4c9af0b33ccb4a *win-Sqrl-1.0.8.exe
-----BEGIN PGP SIGNATURE-----
Version: Keybase OpenPGP v2.1.0
Comment: https://keybase.io/crypto
wsFcBAABCgAGBQJdDt0yAAoJEDT4ke1a0TzTOMAQAINgX0lyieiroTiuBpzHnKuc
yQ2h+2afsVakfkEAOKadNIcXV+MNS0aDPPhvlrlYg3ROGzg9V1kjveG2kcEc1Ok0
5vvwXkUNbZdOznzMJZTGcD6iPUBZV8Qhme4R+tpbF1/WnTBTHpr0p7rHS0S+xV+d
Xf6afGW3ksgRkXkVHVwxlBSW141bbuo6ZL7ORDH31h8hLUX4wgIA3d/yFg26XVvm
2/Uf/3X23JaFSv/NURMhcRsQSSEj+BjPoG9iQ0lhgTYHkglAPg18YtCvyc6+2Gt4
5d8JPBCX14vAbwHWMgRIHpFFX+EhaghVm1OON/i4MhkX6jEQv1ZrODPL0PsAgXfm
t/wUb4s1WsecT29fX07hQD+18KNb46noHSHG8oZuFPIo9Xx4wPhtJ7u6XM0jDy2p
DxKSLuwzNY6NjKB2cU+twqDSswQoQdTjfr3t4+EG4F/2nW/gW/42HZeilxIrWZdr
3H/uBPu9BNTLd9GiMrJILebBZC4ib/E7apc9k2eDGwzKZbEcxAdYZ5b89aVSeeu6
yluIHbMOdJy/cW+LHL9cETZUWFF0V3GVvA5cPF99GvPPfpaTNUeYFrdoCTTmHhV4
2SZnZ84UjNqWNobnQYwzWIR+bEo8k69ZXveOhx9yXGSePvSn1RbBIjefWipMV+aS
WjZ2ZIp+QvKCy/JQGEvQ
=5w25
wsFcBAABCgAGBQJdFkWuAAoJEDT4ke1a0TzTDNgP/30jBXp2zM6dfOMJQIVd6DvY
iSZPFB+aSHipHl8S0ohtcnj5ZKi9oSP8ckCzu+TvYMELBSGJ4HRzyWN17yZp6Is3
C+kgqGmc89XSUuoiCRnJ8oVrdh8Lu/Tn2jdKACnb7s5i/i4+cPe25MYyKUFpAU5r
TZpinWtQPoqR+2sIyycoAZrsAVhDNrC4t7T0W8g9ckGHv2/c48/B12JXnjYTqC83
zz8vIOibCgYbYjMV6IMsNsNVbADMnrpxAITrLECcXIXXJqHFGX6cBWQLp67+Pjz4
/fjSB+LfaNK2tAJOtWhzcEo3f5CGGViRkxCUCtqxUyr1UtEX74kNPjvuwRKGTD83
M6LbS17KCCSmfNs5240EC3EZUcyeksIhSAp/GoByp/A+yPxyPU/y+FB73BAOZjAs
/VrV8SghiPTBIFEy2E1LQnQqtgf1cowkXmZzA8WG4Zipi68wYIsBKBqwRiqJBvZb
dLDLDR50osWmPPcLKPMr/isK/92aRGCGpD1iqfD2Vx0CtIz//ZFCNSPE8zSEt9he
YYGsDAohSh6A4+TeNK2qADD8fWSGOGKQKuypcg7h8c/uQMCet+3GAV7cY/A/xUSu
on7hUTuAT6ILKxVVdPxNNXrJMIHks/U6oG+26Zy8Y008fRV8B8MZlpIOJMCCVN9P
ah3VheR22UCQErWhu2jI
=McRj
-----END PGP SIGNATURE-----
```
2 changes: 1 addition & 1 deletion app/package-lock.json

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

2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Sqrl",
"productName": "Sqrl",
"version": "1.0.7",
"version": "1.0.8",
"description": "",
"main": "./main.prod.js",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/de-DE/common.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"application_name": "Sqrl",
"application_version": "1.0.7",
"application_version": "1.0.8",
"back": "Back",
"block_height": "Block Height",
"cancel": "Cancel",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/en-US/common.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"application_name": "Sqrl",
"application_version": "1.0.7",
"application_version": "1.0.8",
"back": "Back",
"block_height": "Block Height",
"cancel": "Cancel",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/es-ES/common.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"application_name": "Sqrl",
"application_version": "1.0.7",
"application_version": "1.0.8",
"back": "Atrás",
"block_height": "Altura del bloque",
"cancel": "Cancelar",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/et-EE/common.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"application_name": "Sqrl",
"application_version": "1.0.7",
"application_version": "1.0.8",
"back": "Tagasi",
"block_height": "Ploki kõrgus",
"cancel": "Loobu",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/fr-FR/common.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"application_name": "Sqrl",
"application_version": "1.0.7",
"application_version": "1.0.8",
"back": "Back",
"block_height": "Hauteur du Bloc",
"cancel": "Annuler",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/it-IT/common.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"application_name": "Sqrl",
"application_version": "1.0.7",
"application_version": "1.0.8",
"back": "Back",
"block_height": "Numero di Blocco",
"cancel": "Cancella",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/ja-JP/common.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"application_name": "Sqrl",
"application_version": "1.0.7",
"application_version": "1.0.8",
"back": "戻る",
"block_height": "ブロック高",
"cancel": "キャンセル",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/ko-KR/common.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"application_name": "Sqrl",
"application_version": "1.0.7",
"application_version": "1.0.8",
"back": "뒤로",
"block_height": "블록 높이",
"cancel": "취소",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/ru-RU/common.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"application_name": "Настольное приложение для блокцепи EOSIO (Sqrl)",
"application_version": "1.0.7",
"application_version": "1.0.8",
"back": "Back",
"block_height": "Номер Блока",
"cancel": "Отменить",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/zh-CN/common.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"application_name": "Sqrl",
"application_version": "1.0.7",
"application_version": "1.0.8",
"back": "Back",
"block_height": "区块高度",
"cancel": "取消",
Expand Down
103 changes: 68 additions & 35 deletions app/shared/components/Producers/Governance/Ratify/Ratify.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ import GlobalTransactionModal from '../../../Global/Transaction/Modal';
const scope = 'eosio.amend';

class GovernanceProposalsRatify extends Component<Props> {
state= {
currentClauseMarkdown: null,
proposedClauseMarkdown: null
};
constructor(props) {
super(props);
this.state = {
currentClauseMarkdowns: [],
proposedClauseMarkdowns: []
};
}
approve = (ballot_id) => {
const { actions, settings } = this.props;
const voter = settings.account;
Expand Down Expand Up @@ -79,28 +82,61 @@ class GovernanceProposalsRatify extends Component<Props> {
submission_new_clause_nums,
submission_new_ipfs_urls
} = proposal;

if (submission_new_clause_nums && submission_new_clause_nums.length > 0) {
const currentClauseURL = document_clauses[submission_new_clause_nums[0]-1];
if (currentClauseURL) {
fetch(currentClauseURL)
.then(response=>{
return response.text();
}).then(data =>{
this.setState({
currentClauseMarkdown: data
})
});
}
const proposedClauseURL = submission_new_ipfs_urls[0];
if (proposedClauseURL) {
fetch(proposedClauseURL).then(response=>{
return response.text();
}).then(data =>{
this.setState({
proposedClauseMarkdown: data
})
});
for (let clauseIdx = 0; clauseIdx < submission_new_clause_nums.length; clauseIdx++) {
const currentClauseURL = document_clauses[submission_new_clause_nums[clauseIdx]];
//console.log(' seeking clause index ' + clauseIdx + 'for clause # ' + submission_new_clause_nums[clauseIdx] + ' at url ' + currentClauseURL);

(async () => {
await fetch(currentClauseURL)
.then(response=>{
return response.text();
}).then(data =>{
const newCurrentClauseMarkdowns = [
...this.state.currentClauseMarkdowns.slice(0, clauseIdx),
data,
...this.state.currentClauseMarkdowns.slice(clauseIdx + 1)
];

this.setState({
currentClauseMarkdowns: newCurrentClauseMarkdowns
});
}).catch(error => {
/*
console.log(' ERROR seeking clause index ' + clauseIdx + 'for clause # ' +
submission_new_clause_nums[clauseIdx] + ' at url ' + currentClauseURL);
this.setState({
currentClauseMarkdowns: [...this.state.currentClauseMarkdowns,
"CURRENT CLAUSE (" + submission_new_clause_nums[clauseIdx] + ") DOES NOT EXIST"]
});*/
});
})();

const proposedClauseURL = submission_new_ipfs_urls[clauseIdx];
(async () => {
await fetch(proposedClauseURL)
.then(response=>{
return response.text();
}).then(data =>{
const newProposedClauseMarkdowns = [
...this.state.proposedClauseMarkdowns.slice(0, clauseIdx),
data,
...this.state.proposedClauseMarkdowns.slice(clauseIdx + 1)
];

this.setState({
proposedClauseMarkdowns: newProposedClauseMarkdowns
});
}).catch(error => {
/*
this.setState({
proposedClauseMarkdowns: [...this.state.proposedClauseMarkdowns,
"PROPOSED CLAUSE FOR (" + submission_new_clause_nums[clauseIdx] + ") DOES NOT EXIST"]
});*/
});
})();
}
}
}
Expand Down Expand Up @@ -144,12 +180,10 @@ class GovernanceProposalsRatify extends Component<Props> {
} = proposal;

const {
currentClauseMarkdown,
proposedClauseMarkdown
currentClauseMarkdowns,
proposedClauseMarkdowns
} = this.state;

console.log(proposal);

let ballot = ballots.filter((b) => b.reference_id === prop_id && b.table_id === 0)[0];
if (!ballot)
ballot = {};
Expand Down Expand Up @@ -350,16 +384,15 @@ class GovernanceProposalsRatify extends Component<Props> {

<React.Fragment>
{([].concat(submission_new_clause_nums)
.map((clauseNum) => {
clauseNum--;
.map((clauseNum, idx) => {
return (
<div>
<React.Fragment>
<Header
color="black"
size="medium"
size="large"
>
<strong>Clause #:</strong> {clauseNum+1} in {document_title}
<strong>Clause #:</strong> {clauseNum} in {document_title}
</Header>
</React.Fragment>
<Table style={{ marginTop: 20 }}>
Expand All @@ -376,7 +409,7 @@ class GovernanceProposalsRatify extends Component<Props> {
whiteSpace: "normal",
wordWrap: "break-all"
}}>
{(currentClauseMarkdown) ? <ReactMarkdown source={currentClauseMarkdown} /> : clauseNotFound }
{(currentClauseMarkdowns[idx]) ? <ReactMarkdown source={currentClauseMarkdowns[idx]} /> : clauseNotFound}
</Table.Cell>
</Table.Row>
</Table.Body>
Expand All @@ -395,7 +428,7 @@ class GovernanceProposalsRatify extends Component<Props> {
whiteSpace: "normal",
wordWrap: "break-all"
}}>
{(proposedClauseMarkdown) ? <ReactMarkdown source={proposedClauseMarkdown} /> : newClauseNotFound }
{(proposedClauseMarkdowns[idx]) ? <ReactMarkdown source={proposedClauseMarkdowns[idx]} /> : newClauseNotFound}
</Table.Cell>
</Table.Row>
</Table.Body>
Expand Down
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.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Sqrl",
"productName": "Sqrl",
"version": "1.0.7",
"version": "1.0.8",
"description": "A fully featured wallet and governance tool for EOS.IO blockchains",
"scripts": {
"build": "concurrently \"npm run build-main\" \"npm run build-renderer\"",
Expand Down
36 changes: 18 additions & 18 deletions shasum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

cd release

echo "shasum -b -a 512 linux-Sqrl-1.0.7-amd64.deb"
shasum -b -a 512 linux-Sqrl-1.0.7-amd64.deb
echo "shasum -b -a 512 linux-Sqrl-1.0.7-amd64.snap"
shasum -b -a 512 linux-Sqrl-1.0.7-amd64.snap
echo "shasum -b -a 512 linux-Sqrl-1.0.7-arm64.deb"
shasum -b -a 512 linux-Sqrl-1.0.7-arm64.deb
echo "shasum -b -a 512 linux-Sqrl-1.0.7-armv7l.deb"
shasum -b -a 512 linux-Sqrl-1.0.7-armv7l.deb
echo "shasum -b -a 512 linux-Sqrl-1.0.7-i386.deb"
shasum -b -a 512 linux-Sqrl-1.0.7-i386.deb
echo "shasum -b -a 512 linux-Sqrl-1.0.7-x86_64.AppImage"
shasum -b -a 512 linux-Sqrl-1.0.7-x86_64.AppImage
echo "shasum -b -a 512 mac-Sqrl-1.0.7.dmg"
shasum -b -a 512 mac-Sqrl-1.0.7.dmg
echo "shasum -b -a 512 mac-Sqrl-1.0.7.zip"
shasum -b -a 512 mac-Sqrl-1.0.7.zip
echo "shasum -b -a 512 win-Sqrl-1.0.7.exe"
shasum -b -a 512 win-Sqrl-1.0.7.exe
echo "shasum -b -a 512 linux-Sqrl-1.0.8-amd64.deb"
shasum -b -a 512 linux-Sqrl-1.0.8-amd64.deb
echo "shasum -b -a 512 linux-Sqrl-1.0.8-amd64.snap"
shasum -b -a 512 linux-Sqrl-1.0.8-amd64.snap
echo "shasum -b -a 512 linux-Sqrl-1.0.8-arm64.deb"
shasum -b -a 512 linux-Sqrl-1.0.8-arm64.deb
echo "shasum -b -a 512 linux-Sqrl-1.0.8-armv7l.deb"
shasum -b -a 512 linux-Sqrl-1.0.8-armv7l.deb
echo "shasum -b -a 512 linux-Sqrl-1.0.8-i386.deb"
shasum -b -a 512 linux-Sqrl-1.0.8-i386.deb
echo "shasum -b -a 512 linux-Sqrl-1.0.8-x86_64.AppImage"
shasum -b -a 512 linux-Sqrl-1.0.8-x86_64.AppImage
echo "shasum -b -a 512 mac-Sqrl-1.0.8.dmg"
shasum -b -a 512 mac-Sqrl-1.0.8.dmg
echo "shasum -b -a 512 mac-Sqrl-1.0.8.zip"
shasum -b -a 512 mac-Sqrl-1.0.8.zip
echo "shasum -b -a 512 win-Sqrl-1.0.8.exe"
shasum -b -a 512 win-Sqrl-1.0.8.exe

cd ..

0 comments on commit 84e4a8c

Please sign in to comment.