refactoring wallet and fee