storeDetailData() {
        const _this = this;
        // cancel storeDetailData if a transaction is still ongoing
        if (this.state.storeInProgress) return;
        // lock buttons & show spinner
        this.state.storeInProgress = true;
        this.setState(this.state);
        // generate request data
        let requestData = {
            desc: this.state.data.desc,
            amount: this.state.data.amount.toString(),
            price: this.state.data.price.toString()
        };
        if (this.state.storeKey) {
            // Update asset with the given key
            requestData.no = this.state.storeKey;
        } else {
            requestData.no = this.state.data.key;
        }
        // Store asset (send post-request)
        fetch((apiUrl + "setData"), {
            method: 'post',
            headers: { "Content-Type": "application/json" },
            body: JSON.stringify(requestData)
        }).then(function (response) {
            if (!_this.state.storeKey) {
                _this.state.storeKey = requestData.no;
            }
            _this.state.storeInProgress = false;
            _this.setState(_this.state);
        });
    }
/**
     * POST asset data to the API to create/update an asset through a blackchain-transaction
     * @returns 
     */
POST asset data to the API to create/update an asset through a blackchain-transaction
@returns
POST asset data to the API to create / update an asset through a blackchain - transaction @returns
storeDetailData() {
        const _this = this;
        if (this.state.storeInProgress) return;
        this.state.storeInProgress = true;
        this.setState(this.state);
        let requestData = {
            desc: this.state.data.desc,
            amount: this.state.data.amount.toString(),
            price: this.state.data.price.toString()
        };
        if (this.state.storeKey) {
            requestData.no = this.state.storeKey;
        } else {
            requestData.no = this.state.data.key;
        }
        fetch((apiUrl + "setData"), {
            method: 'post',
            headers: { "Content-Type": "application/json" },
            body: JSON.stringify(requestData)
        }).then(function (response) {
            if (!_this.state.storeKey) {
                _this.state.storeKey = requestData.no;
            }
            _this.state.storeInProgress = false;
            _this.setState(_this.state);
        });
    }
storeDetailData ( ) { const _this = this ; if ( this . state . storeInProgress ) return ; this . state . storeInProgress = true ; this . setState ( this . state ) ; let requestData = { desc : this . state . data . desc , amount : this . state . data . amount . toString ( ) , price : this . state . data . price . toString ( ) } ; if ( this . state . storeKey ) { requestData . no = this . state . storeKey ; } else { requestData . no = this . state . data . key ; } fetch ( ( apiUrl + "setData" ) , { method : 'post' , headers : { "Content-Type" : "application/json" } , body : JSON . stringify ( requestData ) } ) . then ( function ( response ) { if ( ! _this . state . storeKey ) { _this . state . storeKey = requestData . no ; } _this . state . storeInProgress = false ; _this . setState ( _this . state ) ; } ) ; }
POST asset data to the API to create/update an asset through a blackchain-transaction
 @returns
POST asset data to the API to create / update an asset through a blackchain - transaction @returns
// cancel storeDetailData if a transaction is still ongoing // lock buttons & show spinner // generate request data // Update asset with the given key // Store asset (send post-request)