Skip to content

Commit

Permalink
Merge branch 'development' into logging-collectibles
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron Hambly committed Feb 1, 2022
2 parents 05b3365 + d84e0fa commit 115e13a
Show file tree
Hide file tree
Showing 38 changed files with 526 additions and 483 deletions.
3 changes: 2 additions & 1 deletion applications/launchpad/gui-vue/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
node_modules
/dist
dist/*
!dist/.gitkeep


# local env files
Expand Down
Empty file.
1 change: 1 addition & 0 deletions applications/tari_collectibles/web-app/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
es2021: true,
},
extends: ["plugin:react/recommended"],
parser: "babel-eslint",
parserOptions: {
ecmaFeatures: {
jsx: true,
Expand Down
82 changes: 1 addition & 81 deletions applications/tari_collectibles/web-app/package-lock.json

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

1 change: 1 addition & 0 deletions applications/tari_collectibles/web-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
]
},
"devDependencies": {
"babel-eslint": "^10.1.0",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsx-a11y": "^6.5.1",
Expand Down
19 changes: 9 additions & 10 deletions applications/tari_collectibles/web-app/src/AccountDashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class AccountDashboard extends React.Component {
}
}

async refreshBalance() {
refreshBalance = async () => {
this.setState({ error: null });
let balance = await binding.command_asset_wallets_get_balance(
this.state.assetPublicKey
Expand All @@ -139,7 +139,7 @@ class AccountDashboard extends React.Component {
return balance;
};

async refresh721() {
refresh721 = async () => {
let tip721Data = {};
let tokens = await binding.command_tip004_list_tokens(
this.state.assetPublicKey
Expand All @@ -157,7 +157,7 @@ class AccountDashboard extends React.Component {
return tip721Data;
};

async onGenerateReceiveAddress() {
onGenerateReceiveAddress = async () => {
try {
this.setState({ error: null });
let receiveAddress = await binding.command_asset_wallets_create_address(
Expand All @@ -171,15 +171,14 @@ class AccountDashboard extends React.Component {
}
};

async onSendToChanged(e) {
onSendToChanged = async (e) => {
this.setState({ sendToAddress: e.target.value });
};

async onSendToAmountChanged(e) {
onSendToAmountChanged = async (e) => {
this.setState({ sendToAmount: parseInt(e.target.value) });
};

async onSend(){
onSend = async () => {
try {
this.setState({ error: "" });
let result = await binding.command_asset_wallets_send_to(
Expand All @@ -198,12 +197,12 @@ class AccountDashboard extends React.Component {
this.setState({ error: err.message });
}
};
async openTip721SendDraft(tokenId) {
openTip721SendDraft = async (tokenId) => {
this.setState({
tip721SendDraftId: tokenId,
});
};
async on721Send(fromAddressId, tokenId) {
on721Send = async (fromAddressId, tokenId) => {
try {
this.setState({ error: "" });
let result = await binding.command_tip721_transfer_from(
Expand All @@ -222,7 +221,7 @@ class AccountDashboard extends React.Component {
}
};

async onSaveToFavorites(){
onSaveToFavorites = async () => {
try {
await binding.command_asset_wallets_create(this.state.assetPublicKey);
await this.reload();
Expand Down
23 changes: 12 additions & 11 deletions applications/tari_collectibles/web-app/src/Create.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class Create extends React.Component {
this.cleanup = null;
}


componentDidMount() {
this.cleanup = appWindow.listen("tauri://file-drop", (obj) =>
this.dropFile(obj)
Expand All @@ -102,7 +103,7 @@ class Create extends React.Component {
}
}

async save() {
save = async () => {
const isValid = await this.validate();
if (!isValid) {
return;
Expand Down Expand Up @@ -182,17 +183,17 @@ class Create extends React.Component {
this.setState({ isSaving: false });
};

async onNameChanged(e){
onNameChanged = (e) => {
this.setState({ name: e.target.value });
};

onTipCheckboxChanged(e, tip){
onTipCheckboxChanged = (e, tip) => {
let obj = {};
obj[tip] = e.target.checked;
this.setState(obj);
};

onTip002DataChanged(field, e){
onTip002DataChanged = (field, e) => {
let tip002Data = {};
tip002Data[field] = e.target.value;
tip002Data = { ...this.state.tip002Data, ...tip002Data };
Expand All @@ -203,19 +204,19 @@ class Create extends React.Component {
// this.setState({ numberInitialTokens: e.target.value });
// };

onDescriptionChanged(e){
onDescriptionChanged = (e) => {
this.setState({
description: e.target.value,
});
};

onNewCommitteePubKeyChanged(e){
onNewCommitteePubKeyChanged = (e) => {
this.setState({
newCommitteePubKey: e.target.value,
});
};

onAddCommitteeMember(){
onAddCommitteeMember = () => {
let committee = [...this.state.tip003Data.committee];
committee.push(this.state.newCommitteePubKey);
let tip003Data = { ...this.state.tip003Data, ...{ committee: committee } };
Expand All @@ -227,7 +228,7 @@ class Create extends React.Component {
});
};

onDeleteCommitteeMember(index){
onDeleteCommitteeMember = (index) => {
let committee = this.state.tip003Data.committee.filter(function (
_,
i,
Expand All @@ -253,13 +254,13 @@ class Create extends React.Component {
return saveErrors.length === 0;
}

onImageChanged(e){
onImageChanged = (e) => {
this.setState({
image: e.target.value,
});
};

async selectFile (){
selectFile = async () => {
const filePath = await dialog.open({
filters: [
{
Expand All @@ -278,7 +279,7 @@ class Create extends React.Component {
}
};

async addFileToIPFS(filePath) {
addFileToIPFS = async (filePath) => {
const parts = filePath.split("/");
const name = parts[parts.length - 1];
// unfortunately the ipfs http /add api doesn't play nicely with the tauri http client
Expand Down
4 changes: 2 additions & 2 deletions applications/tari_collectibles/web-app/src/NewAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ class NewAccount extends React.Component {
};
}

onAssetPublicKeyChanged(e){
onAssetPublicKeyChanged = (e) => {
this.setState({ assetPublicKey: e.target.value });
};

async onSave(e){
onSave = async (e) => {
e.preventDefault();
console.log(this.state.assetPublicKey);
this.setState({ isSaving: true, error: null });
Expand Down
3 changes: 1 addition & 2 deletions applications/tari_explorer/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"endOfLine": "auto",
"semi": false
"endOfLine": "auto"
}
Loading

0 comments on commit 115e13a

Please sign in to comment.