                 set_fee @operations[i][1]
             #DEBUG console.log('... get_required_fees',operations,asset_id,flat_assets)
             return
-    
+
     finalize:()->
         new Promise (resolve, reject)=>
             throw new Error "already finalized" if @tr_buffer

module.exports = _my = {}

_my.signed_transaction = ->
    
    ref_block_num: 0
    ref_block_prefix: 0
    expiration: 0

            else
                asset_id = "1.3.0"

        promises = [
            Apis.instance().db_api().exec( "get_required_fees",
                [operations, asset_id]
            )
        ]

        if asset_id isnt "1.3.0"
            asset = ChainStore.getAsset(asset_id)
            fee_pool = asset.getIn ["dynamic", "fee_pool"]
            promises.push Apis.instance().db_api().exec( "get_required_fees",
                [operations, "1.3.0"]
            )

        Promise.all(promises)
        .then (results)=>
            fees = results[0]

            if asset_id isnt "1.3.0"
                coreFees = results[1]
                totalFees = 0
                for fee in coreFees
                    totalFees += fee.amount

                if totalFees > parseInt fee_pool, 10
                    fees = coreFees
                    asset_id = "1.3.0"

            flat_assets = []
            flatten = (obj) ->
                if Array.isArray obj
