@gphone/sdk
    Preparing search index...

    Function useAccount

    • OS Service Hook for account state, bank balance, transactions, & phone number.

      Returns {
          bankBalance: Writable<number>;
          citizenid: Writable<string>;
          fetchBalance: () => Promise<void>;
          fetchCitizenId: () => Promise<string>;
          fetchPhoneNumber: () => Promise<string>;
          fetchTransactions: () => Promise<void>;
          myPhoneNumber: Writable<string>;
          transactions: Writable<Transaction[]>;
          transactionsLoaded: Writable<boolean>;
      }

      • bankBalance: Writable<number>
      • citizenid: Writable<string>
      • fetchBalance: () => Promise<void>
      • fetchCitizenId: () => Promise<string>
      • fetchPhoneNumber: () => Promise<string>
      • fetchTransactions: () => Promise<void>
      • myPhoneNumber: Writable<string>
      • transactions: Writable<Transaction[]>
      • transactionsLoaded: Writable<boolean>

        False until the first transaction fetch has come back.

        Same signal createCrudStore exposes, for the same reason: an empty list is not the same statement as "this account has no transactions", and Bank used to make the second one while still waiting for the first.