Skip to content

Commit

Permalink
fix(GA): Fix GA account composition. Update AEPP example
Browse files Browse the repository at this point in the history
  • Loading branch information
nduchak committed Aug 21, 2019
1 parent 3b02a8b commit 211e409
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
4 changes: 2 additions & 2 deletions es/contract/ga/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/
import * as R from 'ramda'

import { Contract } from '../../ae/contract'
import { ContractAPI } from '../../ae/contract'
import { ABI_VERSIONS, TX_TYPE } from '../../tx/builder/schema'
import { buildTx } from '../../tx/builder'
import { getContractAuthFan, prepareGaParams, wrapInEmptySignedTx } from './helpers'
Expand All @@ -50,7 +50,7 @@ import { assertedType, decodeBase64Check } from '../../utils/crypto'
* // or
* await client.spend(10000, receiverPub, { authData: { source: authContract, args: [...authContractArgs] } }) // sdk will prepare callData itself
*/
export const GeneralizeAccount = Contract.compose({
export const GeneralizeAccount = ContractAPI.compose({
methods: {
createGeneralizeAccount,
createMetaTx,
Expand Down
35 changes: 35 additions & 0 deletions examples/browser/vuejs/connect-two-ae/aepp/src/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,39 @@
{{height}}
</div>
</div>

<div v-if="nodeInfo" class="bg-green w-full flex flex-row font-mono border border-b">
<div class="p-2 w-1/4">
Url
</div>
<div class="p-2 w-3/4 bg-grey-lightest">
{{nodeInfo.url}}
</div>
</div>
<div v-if="nodeInfo" class="bg-green w-full flex flex-row font-mono border border-b">
<div class="p-2 w-1/4">
Name
</div>
<div class="p-2 w-3/4 bg-grey-lightest">
{{nodeInfo.name}}
</div>
</div>
<div v-if="nodeInfo" class="bg-green w-full flex flex-row font-mono border border-b">
<div class="p-2 w-1/4">
NetworkId
</div>
<div class="p-2 w-3/4 bg-grey-lightest">
{{nodeInfo.nodeNetworkId}}
</div>
</div>
<div v-if="nodeInfo" class="bg-green w-full flex flex-row font-mono border border-b">
<div class="p-2 w-1/4">
Version
</div>
<div class="p-2 w-3/4 bg-grey-lightest">
{{nodeInfo.version}}
</div>
</div>
</div>

<h2 class="mt-4">Spend tokens</h2>
Expand Down Expand Up @@ -156,6 +189,7 @@
spendPayload: null,
spendResult: null,
spendError: null,
nodeInfo: null,
contractCode: `contract Identity =
type state = ()
entrypoint main(x : int) = x`,
Expand Down Expand Up @@ -231,6 +265,7 @@
})
this.pub = await this.client.address()
this.height = await this.client.height()
this.nodeInfo = await this.client.getNodeInfo()
}
}
</script>

0 comments on commit 211e409

Please sign in to comment.