Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a7c497da6a |
@@ -1,4 +0,0 @@
|
||||
template: |
|
||||
## Changes
|
||||
|
||||
$CHANGES
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -58,7 +58,10 @@ class Contribution extends Record {
|
||||
ipfsHashAttr.hashSize,
|
||||
];
|
||||
|
||||
return this.functions.add(...contribution, callOptions);
|
||||
return this.functions.add(...contribution, callOptions).then(res => {
|
||||
res.ipfsHash = this.ipfs.encodeHash(ipfsHashAttr);
|
||||
return res;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class Contributor {
|
||||
github_username,
|
||||
gitea_username,
|
||||
wiki_username,
|
||||
zoom_display_name,
|
||||
accounts,
|
||||
} = this;
|
||||
|
||||
let data = {
|
||||
@@ -36,7 +36,7 @@ class Contributor {
|
||||
'@type': 'Contributor',
|
||||
kind,
|
||||
name,
|
||||
accounts: [],
|
||||
accounts: accounts || [],
|
||||
};
|
||||
|
||||
if (url) {
|
||||
@@ -68,13 +68,6 @@ class Contributor {
|
||||
});
|
||||
}
|
||||
|
||||
if (zoom_display_name) {
|
||||
data.accounts.push({
|
||||
'site': 'zoom.us',
|
||||
'username': zoom_display_name,
|
||||
});
|
||||
}
|
||||
|
||||
// Write it pretty to ipfs
|
||||
return JSON.stringify(data, null, 2);
|
||||
}
|
||||
@@ -104,11 +97,10 @@ class Contributor {
|
||||
accounts,
|
||||
} = JSON.parse(serialized.toString('utf8'));
|
||||
|
||||
let github_username, github_uid, gitea_username, wiki_username, zoom_display_name;
|
||||
let github_username, github_uid, gitea_username, wiki_username;
|
||||
let github = accounts.find(a => a.site === 'github.com');
|
||||
let gitea = accounts.find(a => a.site === 'gitea.kosmos.org');
|
||||
let wiki = accounts.find(a => a.site === 'wiki.kosmos.org');
|
||||
let zoom = accounts.find(a => a.site === 'zoom.us');
|
||||
|
||||
if (github) {
|
||||
(({ username: github_username, uid: github_uid} = github));
|
||||
@@ -119,9 +111,6 @@ class Contributor {
|
||||
if (wiki) {
|
||||
(({ username: wiki_username } = wiki));
|
||||
}
|
||||
if (zoom) {
|
||||
(({ username: zoom_display_name } = zoom));
|
||||
}
|
||||
|
||||
return {
|
||||
name,
|
||||
@@ -132,7 +121,6 @@ class Contributor {
|
||||
github_username,
|
||||
gitea_username,
|
||||
wiki_username,
|
||||
zoom_display_name,
|
||||
ipfsData: serialized,
|
||||
};
|
||||
}
|
||||
|
||||
Generated
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "kredits-contracts",
|
||||
"version": "5.5.0",
|
||||
"version": "5.4.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -6132,4 +6132,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "kredits-contracts",
|
||||
"version": "5.5.0",
|
||||
"version": "5.4.0",
|
||||
"description": "Ethereum contracts and npm wrapper for Kredits",
|
||||
"main": "./lib/kredits.js",
|
||||
"directories": {
|
||||
|
||||
Reference in New Issue
Block a user