on master help sign in
bridge/src/lib/useCurrentPermissions.js
17 lines 487 B history raw
1import usePermissionsForPoint from './usePermissionsForPoint';
2import { useWallet } from 'store/wallet';
3import { usePointCursor } from 'store/pointCursor';
5export default function useCurrentPermissions() {
6 const { wallet } = useWallet();
7 const { pointCursor } = usePointCursor();
9 const _address = wallet.matchWith({
10 Nothing: () => '',
11 Just: p => p.value.address,
12 });
14 const _point = pointCursor.getOrElse(null);
16 return usePermissionsForPoint(_address, _point);