Skip to content

Commit

Permalink
fix lient to client
Browse files Browse the repository at this point in the history
  • Loading branch information
cmtkc committed Jan 8, 2017
1 parent 2f7dc65 commit 5df21d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion meteor_dapp/simple_ether_wallet.md
Expand Up @@ -498,7 +498,7 @@ Template.blockStatusComponent.helpers({

ここで、それぞれのヘルパーは、`nodeStatusComponent`のヘルパとは異なり、情報をweb3オブジェクトから取得するのではなく、そのラッパーである`EthAccounts``EthBlocks`から取り出しています。これらのラッパー・オブジェクトを利用することで、状態が変わると自動的に表示が更新されるリアクティブな表示が可能になります。

また、`lient/templates/components/account_status_component.html`内で`{{#each accounts}}...{{/each}}`のblock helpersタグが追加されています。これはヘルパーでのaccountsメソッドで取得されるのはアカウントオブジェクトの配列であり、その配列の要素づつ取り出し、それを`accountBalanceItem`テンプレート側で`name``balance`属性を取得するようにしています。
また、`client/templates/components/account_status_component.html`内で`{{#each accounts}}...{{/each}}`のblock helpersタグが追加されています。これはヘルパーでのaccountsメソッドで取得されるのはアカウントオブジェクトの配列であり、その配列の要素づつ取り出し、それを`accountBalanceItem`テンプレート側で`name``balance`属性を取得するようにしています。

最後に、`blockStatusComponent`のヘルパ内で、UNIX時間表記で得られる採掘日時を通常の日時表記で表示されるよう`unix2datetime`関数を呼び出しているので、この関数のコードを追加します。

Expand Down

0 comments on commit 5df21d9

Please sign in to comment.